Răsfoiți Sursa

BUG #11123: Generic include dir should come after config specific one.

Miguel A. Figueroa-Villanueva 15 ani în urmă
părinte
comite
f46712ebe7
1 a modificat fișierele cu 10 adăugiri și 10 ștergeri
  1. 10 10
      Modules/FindwxWidgets.cmake

+ 10 - 10
Modules/FindwxWidgets.cmake

@@ -563,23 +563,23 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
         # Get configuration parameters from the name.
         WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
 
-        # 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
+          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.")
+          DBG_MSG("wxWidgets_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)
+
         # Find wxWidgets libraries.
         WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}")
         IF(WX_USE_REL_AND_DBG)