Skip to content

CMake ignoring -DwxWidgets_INCLUDE_DIRS and -DwxWidgets_LIBRARIES options. #148

Description

@gmatht

I have specified the directories that wxWidgets is installed. CMake acknowledges my setting wxWidgets_LIBRARY_DIRS, but ignores -DwxWidgets_INCLUDE_DIRS=/d/GitHub/lib/wx/include/msvc/wx -DwxWidgets_LIBRARIES=/d/GitHub/lib/wx/lib/vc14x_x64_dll (Windows 11, MSVC2022)

$ cmake . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DwxWidgets_CONFIGURATION=mswu -DCMAKE_BUILD_TYPE=MinSizeRel -DwxWidgets_COMPONENTS=core -DwxWidgets_ROOT_DIR=/d/GitHub/lib/wx -DwxWidgets_LIB_DIR=/d/GitHub/lib/wx/lib/vc14x_x64_dll -DwxWidgets_INCLUDE_DIRS=/d/GitHub/lib/wx/include/msvc/wx -DwxWidgets_LIBRARIES=/d/GitHub/lib/wx/lib/vc14x_x64_dll
CMake Warning (dev) at CMakeLists.txt:8 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.26100.
CMake Deprecation Warning at CMakeLists.txt:20 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- * ---------------------------------------------------------------------------
-- * CMake command line options and tips specific to this project
-- *
-- * In the CMake GUI you can set values and press configure a few times
-- * and until there are no more red items, then press generate.
-- *
-- * Usage: cmake -D[OPTION_NAME]=[OPTION_VALUE] /path/to/CMakeLists.txt/
-- * ---------------------------------------------------------------------------
-- * -DHELP=TRUE
-- *   Show this help message and exit, no files will be generated.
-- * -DCMAKE_BUILD_TYPE=[Debug, Release, RelWithDebInfo, MinSizeRel] : (Default Debug)
-- *   Makefiles : You must set the build type to Debug, Release...
-- *   MSVC GUI  : No need to set this since you can choose it in the GUI.
-- * -DBUILD_SHARED_LIBS=[TRUE, FALSE] : (Default static in MSW, shared in Linux)
-- *   Build shared (.DLL or .so) or static (.lib or .a) libraries.
-- * ---------------------------------------------------------------------------
--
--
-- *****************************************************************************
-- * BUILD TYPE:        MinSizeRel
-- * BUILD_SHARED_LIBS: FALSE
-- *****************************************************************************
-- * System is 32-bit FALSE, is 64-bit TRUE
-- *****************************************************************************
-- * CMAKE_SOURCE_DIR = D:/GitHub/jautogui/lua_gui/wxlua/wxLua
-- * CMAKE_BINARY_DIR = D:/GitHub/jautogui/lua_gui/wxlua/wxLua
-- *****************************************************************************
--
-- * ---------------------------------------------------------------------------
-- * wxWidgets library settings :
-- *
-- * Note that ONLY an all shared (DLL) or all static build is supported.
-- *   I.E. If you choose shared you must link to shared wxWidgets libs.
-- *   Set -DBUILD_SHARED_LIBS=[TRUE, FALSE] to control shared/static lib.
-- *
-- * Finding wxWidgets for MSW and MSVC
-- * -DwxWidgets_ROOT_DIR=[path] : (e.g. /path/to/wxWidgets/)
-- *   Path to the root of the wxWidgets build, must at least set this.
-- * -DwxWidgets_LIB_DIR=[path] : (e.g. /path/to/wxWidgets/lib/vc_lib/)
-- *   Path to the wxWidgets lib dir also set this if libs can't be found.
-- * -DwxWidgets_CONFIGURATION=[configuration] :
-- *   Set wxWidgets configuration; e.g. msw, mswu, mswunivu...
-- *   Where 'u' = unicode and 'd' = debug.
-- *   MSVC GUI : You need only choose msw, mswu, mswuniv, mswunivu since
-- *              release or debug mode is chosen in the GUI.
-- * -DwxWidgets_COMPONENTS=[...stc;html;adv;core;base or mono] :
-- *   For non-monolithic builds choose the wxWidgets libs to link to.
-- *    xrc;xml;gl;net;media;propgrid;richtext;aui;stc;html;adv;core;base
-- *   For monolithic builds choose mono and the contribs libs.
-- *    stc;mono
-- *   The extra decorations, e.g. wxmsw28ud_adv.lib, will be searched for.
-- *   Libs that cannot be found will be printed below, please fix/remove
-- *   them to be able to build this project.
-- *   You will get compilation/linker errors if wxWidgets is not found.
-- *
-- * Finding wxWidgets for GCC and Unix type systems
-- * -DwxWidgets_CONFIG_EXECUTABLE=[path/to/wx-config] :
-- *   Specify path to wx-config script for GCC and Unix type builds
-- * ---------------------------------------------------------------------------
--
-- * Using these wxWidgets components: core
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS core)
-- *
CMake Warning at build/CMakewxAppLib.cmake:325 (message):
  * WARNING: Could not find wxWidgets! Please see help above.
Call Stack (most recent call first):
  CMakeLists.txt:58 (FIND_WXWIDGETS)


-- * - wxWidgets_VERSION           = 3.2.8 = 3.2.8
-- * - wxWidgets_COMPONENTS        = core
-- * - wxWidgets_INCLUDE_DIRS      =
-- * - wxWidgets_LIBRARY_DIRS      = D:/GitHub/lib/wx/lib/vc14x_x64_dll
-- * - wxWidgets_LIBRARIES         =
-- * - wxWidgets_CXX_FLAGS         =
-- * - wxWidgets_DEFINITIONS       =
-- * - wxWidgets_DEFINITIONS_DEBUG =
-- * - wxWidgets_PORTNAME          =
-- * - wxWidgets_UNIVNAME          =
-- * - wxWidgets_UNICODEFLAG       =
-- * - wxWidgets_DEBUGFLAG         =
 WARNING: Unable to find requested wxWidgets component : core
-- *
wxWidgets requested but not found.
-- * WARNING: Specified wxLuaBinding lib 'webview' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'gl' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'stc' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'xrc' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'richtext' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'propgrid' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'html' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'media' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'aui' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'adv' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'xml' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'net' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'base' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * wxLua using built-in Lua 5.1 library
-- * Not copying the Lua proxydlls since they do not work in the 64-bit build.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- * WARNING: Doxygen NOT found, wxLua_doxygen target will not be generated.
CMake Deprecation Warning at bindings/CMakeLists.txt:17 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring done (1.0s)
-- Generating done (1.8s)
-- Build files have been written to: D:/GitHub/jautogui/lua_gui/wxlua/wxLua

If this helps:

/d/GitHub/lib/wx/
/d/GitHub/lib/wx/include
/d/GitHub/lib/wx/include/msvc
/d/GitHub/lib/wx/include/msvc/wx
/d/GitHub/lib/wx/include/msvc/wx/setup.h
/d/GitHub/lib/wx/include/wx
/d/GitHub/lib/wx/include/wx/aboutdlg.h
/d/GitHub/lib/wx/include/wx/accel.h
/d/GitHub/lib/wx/include/wx/access.h
/d/GitHub/lib/wx/include/wx/activityindicator.h
..<snipped for length>..
/d/GitHub/lib/wx/include/wx/xti.h
/d/GitHub/lib/wx/include/wx/xti2.h
/d/GitHub/lib/wx/include/wx/xtictor.h
/d/GitHub/lib/wx/include/wx/xtihandler.h
/d/GitHub/lib/wx/include/wx/xtiprop.h
/d/GitHub/lib/wx/include/wx/xtistrm.h
/d/GitHub/lib/wx/include/wx/xtitypes.h
/d/GitHub/lib/wx/include/wx/xtixml.h
/d/GitHub/lib/wx/include/wx/zipstrm.h
/d/GitHub/lib/wx/include/wx/zstream.h
/d/GitHub/lib/wx/lib
/d/GitHub/lib/wx/lib/vc14x_x64_dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxbase32u_net_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxbase32u_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxbase32u_xml_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_adv_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_aui_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_core_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_gl_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_html_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_media_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_propgrid_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_qa_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_ribbon_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_richtext_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_stc_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_webview_vc14x_x64.dll
/d/GitHub/lib/wx/lib/vc14x_x64_dll/wxmsw32u_xrc_vc14x_x64.dll

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions