MantisBT - CMake
View Issue Details
0015928CMakeModulespublic2016-01-19 11:472016-06-10 14:31
deaths_soul 
Kitware Robot 
normalminoralways
closedmoved 
CMake 3.4.1 
 
0015928: FindwxWidgets Fails
When I try to use FindwxWidgets in CMake 3.4.1, I keep getting the following error:
CMake Error at /usr/share/cmake/Modules/FindwxWidgets.cmake:870 (message):
   wxWidgets wx/version.h file not found in
   /home/User/Code/wxWidgets/win_build32/lib/wx/include/i686-w64-mingw32-msw-unicode-static-3.0;/home/User/Code/wxWidgets/include.

Even though the file exists and I've even made a symlink in the other location to make sure. In either case, I get that error. However, if I downgrade to CMake 3.3.2, everything works as it should.

The full path to wx/version.h is /home/User/Code/wxWidgets/include/wx/version.h.

In CMakeCache.txt, the _filename variable is set as follows: _filename:FILEPATH=_filename-NOTFOUND

It's set to this value in both the CMakeCache.txt for 3.3.2 and 3.4.1. In testing, I even deleted the working directory and started from a clean slate and the issue still occurred with 3.4.1.

This is under Fedora 23 and cross-compiling using MinGW. The wxWidgets library is self-compiled.

CMAKE_FIND_ROOT_PATH is set to usr/x86_64-w64-mingw32/sys-root/mingw or /usr/i686-w64-mingw32/sys-root/mingw depending on which architecture I'm building for. I use a mixture of libraries from the repos and self-built, though.

CMAKE_FIND_ROOT_PATH_MODE_INCLUDE is set to ONLY.

Manually passing -D_filename=/home/User/Code/wxWidgets/include/wx/version.h when I run the CMake configuration fixes the issue.
No tags attached.
Issue History
2016-01-19 11:47deaths_soulNew Issue
2016-01-19 14:21Brad KingNote Added: 0040264
2016-01-19 14:28Brad KingNote Added: 0040265
2016-01-19 14:32Richard ShawNote Added: 0040266
2016-01-19 14:34deaths_soulNote Added: 0040267
2016-06-10 14:29Kitware RobotNote Added: 0042917
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0040264)
Brad King   
2016-01-19 14:21   
It looks like this was introduced here:

 FindwxWidgets: allow specifying required version
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6089fde5 [^]

The patch was posted here:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/14272 [^]
(0040265)
Brad King   
2016-01-19 14:28   
I've raised this issue in the original patch thread here:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/14272/focus=15523 [^]
(0040266)
Richard Shaw   
2016-01-19 14:32   
Are you using the mingw helper?

i.e.:
mingw32-cmake /path/to/CmakeFiles.txt
(0040267)
deaths_soul   
2016-01-19 14:34   
Yep. I use mingw64-cmake for 64-bit and mingw32-cmake for 32-bit.
(0042917)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.