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

Johannes Zarl johannes.zarl at jku.at
Mon Dec 15 04:52:53 EST 2014


Hello Robert,

I don't have a test-environment handy, but it seems like FindwxWidgets checks 
for the vc_x64 library directory prefix, not for vc_amd64:

# /usr/share/cmake-3.0/Modules/FindwxWidgets.cmake:511:
    if(MINGW)
      set(WX_LIB_DIR_PREFIX gcc)
    elseif(CMAKE_CL_64)
      set(WX_LIB_DIR_PREFIX vc_x64)
    else()
      set(WX_LIB_DIR_PREFIX vc)
    endif()


The wxWidgets changelog[1] seems to suggest that "_x64" is the correct name. 
Maybe this is a bug in the wxWidgets installer?

Cheers,
  Johannes


[1] https://github.com/wxWidgets/wxWidgets/blob/WX_3_0_2/docs/changes.txt#L520


On Wednesday 10 December 2014 16:47:38 Robert Pollak wrote:
> 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