[CMake] 64 bit build of wxWidgets-2.8.12 is not found

Robert Pollak robert.pollak at jku.at
Wed Dec 10 10:47:38 EST 2014


Hello,

I am using:
- Windows 7 Professional 64 Bit
- Visual Studio 2010 Professional
- CMake 3.0.1

and I have installed wxMSW-2.8.12-Setup.exe to L:\wxWidgets-2.8.12-vc10\
and created 32 bit and 64 bit shared library builds there (see footnote [1]).

Now I want to use the 64-bit wxWidgets libraries in a CMake-based project.
For that, I have started with a minimal CMakeLists.txt in an empty folder:
> cmake_minimum_required(VERSION 3.0.1)
> 
> find_package(wxWidgets REQUIRED core base)

and created a 64 bit configuration cmake-win64-libs-vc10.conf next to it:
> set(wxWidgets_ROOT_DIR "L:/wxWidgets-2.8.12-vc10" CACHE PATH "wxWidgets base directory" FORCE)
> set(wxWidgets_LIB_DIR "L:/wxWidgets-2.8.12-vc10/lib/vc_amd64_dll" CACHE PATH "wxWidgets libraries directory" FORCE)
> set(wxWidgets_CONFIGURATION msw CACHE PATH "wxWidgets configuration" FORCE)

When I now call my configure-win64-vc10.bat there:
> setlocal
> rmdir /S /Q build
> mkdir build
> cd build
> set WXWIN=L:\wxWidgets-2.8.12-vc10
> cmake -C ..\cmake-win64-libs-vc10.conf ^
>       -G "Visual Studio 10 Win64" ^
>       ..
> cd ..
> endlocal

, I get the error
> CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
>   Could NOT find wxWidgets (missing: wxWidgets_FOUND)
> Call Stack (most recent call first):
>   C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
>   C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindwxWidgets.cmake:869 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>   CMakeLists.txt:4 (find_package)

However, a corresponding 32-bit configuration works!
The only differences of my 32-bit and 64-bit configurations are
* the wxWidgets_LIB_DIR: vc_amd64_dll vs. vc_dll (both directories are existing and filled with the corresponding dlls)
* the CMake generator: "Visual Studio 10 Win64" vs. "Visual Studio 10"

This looks to me like a bug of FindwxWidgets.cmake.
Can anyone confirm? How can I debug this?


Best regards,
Robert

--------

[1] with
> call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
> set WXWIN=D:\libraries\wxWidgets-2.8.12-vc10
> cd \wxWidgets-2.8.12-vc10\build\msw
> nmake /f makefile.vc BUILD=debug   SHARED=1
> nmake /f makefile.vc BUILD=release SHARED=1
resp.
> call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64
> set WXWIN=D:\libraries\wxWidgets-2.8.12-vc10
> cd \wxWidgets-2.8.12-vc10\build\msw
> nmake /f makefile.vc TARGET_CPU=AMD64 BUILD=debug   SHARED=1
> nmake /f makefile.vc TARGET_CPU=AMD64 BUILD=release SHARED=1


More information about the CMake mailing list