CMake在Windows上找不到wxWidgets

时间:2017-10-03 23:58:27

标签: windows cmake wxwidgets

我的CMakeLists.txt中有以下代码段,如wxWidgets wiki

中所述
set(wxWidgets_ROOT_DIR libs/wxWidgets)
set(wxWidgets_CONFIGURATION mswu)
find_package(wxWidgets REQUIRED
        COMPONENTS core base adv)
include(${wxWidgets_USE_FILE})

libs/wxWidgets是一个git子模块。在Ubuntu 16.04上,该项目构建并运行。 子模块描述是:

[submodule "libs/wxWidgets"]
    path = libs/wxWidgets
    url = https://github.com/wxWidgets/wxWidgets
    branch = WX_3_0_3_BRANCH

但是,在Windows上使用相同的代码不起作用,错误如:

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
      Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.9/Modules/FindwxWidgets.cmake:953 (find_package_handle_standard_args)
  CMakeLists.txt:8 (find_package)

尝试了official siteThis question安装的其他wxWidgets,包括zipWindows Installer,但同样的错误也是如此。

{{3}}可能有关系,但没有可接受的答案。

0 个答案:

没有答案