View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011123 | CMake | Modules | public | 2010-08-12 13:29 | 2010-11-09 22:57 | ||||
Reporter | rogerjames99 | ||||||||
Assigned To | Miguel Figueroa | ||||||||
Priority | normal | Severity | minor | Reproducibility | sometimes | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | CMake 2.8.3 | Fixed in Version | CMake 2.8.3 | ||||||
Summary | 0011123: Wrong directory order in wxWidgets_INCLUDE_DIRS | ||||||||
Description | The CMake module FindwxWidgets.cmake sets up an a variable called wxWidgets_INCLUDE_DIRS which is intended to be used as the source of additional include directories to be searched by various build tools. The code that sets this up looks like this. # Set wxWidgets main include directory. IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) SET(wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") SET(wxWidgets_FOUND FALSE) ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) # Set wxWidgets lib setup include directory. IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) LIST(APPEND wxWidgets_INCLUDE_DIRS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) DBG_MSG("WXWIDGET_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") SET(wxWidgets_FOUND FALSE) ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) This results in the configuration specific (unicode/non-unicode) include directories being placed after the generic include directory in the list. This needs to be the other way round and can cause "duplicate manifest resource" problems when linking applications on windows visual studio platforms. This is caused by the fact that the file "rcdefs.h" exists in both the configuration specific include dir and in the generic include dir. However the version of rcdefs.h in the generic include dir is only intended to be used if configuration specific ones are not found. The gory details are that the generic rcdefs.h does not contain a definition for WX_MSC_FULL_VER which is used to stop wxWidgets trying to link in its own manifest resource when newer versions of the of the Microsoft Compiler that provide their own manifests are being used. A quick wxWidgets fix is to delete or rename rcdefs.h in the generic include dir. I suggest that the two pieces of CMake code are swapped round and the SET and LIST commands modified as appropriate. Having the include dirs in the current order may well cause other obscure problems as well. | ||||||||
Additional Information | Suggested fix (untested): # Set wxWidgets lib setup include directory. IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) SET(wxWidgets_INCLUDE_DIRS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION} ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) DBG_MSG("WXWIDGET_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") SET(wxWidgets_FOUND FALSE) ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) # Set wxWidgets main include directory. IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) LIST(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") SET(wxWidgets_FOUND FALSE) ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0022058) Miguel Figueroa (developer) 2010-09-01 10:53 |
commit f46712ebe7b3fe60a02f5fc5cf08cc861287c42b Author: Miguel A. Figueroa-Villanueva <miguelf@ieee.org> Date: Wed Sep 1 10:40:01 2010 -0400 BUG 0011123: Generic include dir should come after config specific one. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-08-12 13:29 | rogerjames99 | New Issue | |
2010-08-29 02:23 | Kovarththanan Rajaratnam | Category | CMake => Modules |
2010-08-30 00:21 | Kovarththanan Rajaratnam | Status | new => assigned |
2010-08-30 00:21 | Kovarththanan Rajaratnam | Assigned To | => Miguel Figueroa |
2010-09-01 10:53 | Miguel Figueroa | Note Added: 0022058 | |
2010-09-01 10:53 | Miguel Figueroa | Status | assigned => resolved |
2010-09-01 10:53 | Miguel Figueroa | Fixed in Version | => CMake 2.8.3 |
2010-09-01 10:53 | Miguel Figueroa | Resolution | open => fixed |
2010-09-10 00:12 | David Cole | Target Version | => CMake 2.8.3 |
2010-11-09 22:57 | Philip Lowman | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |