MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0011296 | CMake | Modules | public | 2010-10-07 03:47 | 2016-06-10 14:31 | |||||
Reporter | Florent Teichteil | |||||||||
Assigned To | Richard Shaw | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | closed | Resolution | moved | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake-2-8 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0011296: FindwxWidget.cmake prevents from cross compiling for Windows under Linux | |||||||||
Description | Hi all, There is a bug in the cmake module FindwxWidgets.cmake that prevents any library using wxWidgets to cross compile for Windows from Linux. Please note that this bug is different from issue 0006187. Lines 192 to 198 are concerned by the present bug: IF(WIN32 AND NOT CYGWIN AND NOT MSYS) SET(wxWidgets_FIND_STYLE "win32") ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS) IF(UNIX OR MSYS) SET(wxWidgets_FIND_STYLE "unix") ENDIF(UNIX OR MSYS) ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS) The problem is that, when cross compiling from Linux for Windows, the test "WIN32 AND NOT CYGWIN AND NOT MSYS" is true but find style should be "unix", because the Windows-based wxWidget library is installed in a unix environment. Therefore, the following line replacement corrects this bug: IF(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING) SET(wxWidgets_FIND_STYLE "win32") ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING) IF(UNIX OR MSYS OR CMAKE_CROSSCOMPILING) SET(wxWidgets_FIND_STYLE "unix") ENDIF(UNIX OR MSYS OR CMAKE_CROSSCOMPILING) ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING) The modified FindwxWidget.cmake module runs fine with the following toolchain cmake file: SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_C_COMPILER /usr/bin/i686-pc-mingw32-gcc) SET(CMAKE_CXX_COMPILER /usr/bin/i686-pc-mingw32-g++) SET(CMAKE_FIND_ROOT_PATH /usr/i686-pc-mingw32) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) Could this "patch" be applied in cmake svn, please? All the best, Florent | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2010-10-07 03:47 | Florent Teichteil | New Issue | ||||||||
2010-10-07 08:37 | Miguel Figueroa | Status | new => assigned | |||||||
2010-10-07 08:37 | Miguel Figueroa | Assigned To | => Miguel Figueroa | |||||||
2013-01-30 19:44 | abma | Note Added: 0032183 | ||||||||
2013-04-16 02:25 | Rolf Eike Beer | Relationship added | has duplicate 0014092 | |||||||
2013-06-03 11:40 | Richard Shaw | Note Added: 0033213 | ||||||||
2013-10-13 15:40 | Richard Shaw | Note Added: 0034115 | ||||||||
2014-03-26 21:51 | Orion Poplawski | Note Added: 0035534 | ||||||||
2014-08-20 09:32 | Richard Shaw | Note Added: 0036655 | ||||||||
2014-08-20 10:26 | Richard Shaw | Assigned To | Miguel Figueroa => Richard Shaw | |||||||
2014-08-20 10:26 | Richard Shaw | Status | assigned => acknowledged | |||||||
2014-08-25 09:04 | Richard Shaw | Note Added: 0036674 | ||||||||
2016-06-10 14:28 | Kitware Robot | Note Added: 0041751 | ||||||||
2016-06-10 14:28 | Kitware Robot | Status | acknowledged => resolved | |||||||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | |||||||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|