BUG: Fix so that MinGW use win32_find_style (6478). Also, consolidated search styles selection into a single variable, so that they are mutually exclusive.

This commit is contained in:
Miguel A. Figueroa-Villanueva 2008-06-16 14:15:52 -04:00
parent 8ef9983db6
commit 6c97713a27
1 changed files with 17 additions and 20 deletions

View File

@ -174,21 +174,18 @@ ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
#===================================================================== #=====================================================================
#===================================================================== #=====================================================================
IF(WIN32) IF(WIN32 AND NOT CYGWIN)
SET(WIN32_STYLE_FIND 1) SET(wxWidgets_FIND_STYLE "win32")
ENDIF(WIN32) ELSE(WIN32 AND NOT CYGWIN)
IF(MINGW) IF(UNIX)
SET(WIN32_STYLE_FIND 0) SET(wxWidgets_FIND_STYLE "unix")
SET(UNIX_STYLE_FIND 1) ENDIF(UNIX)
ENDIF(MINGW) ENDIF(WIN32 AND NOT CYGWIN)
IF(UNIX)
SET(UNIX_STYLE_FIND 1)
ENDIF(UNIX)
#===================================================================== #=====================================================================
# WIN32_STYLE_FIND # WIN32_FIND_STYLE
#===================================================================== #=====================================================================
IF(WIN32_STYLE_FIND) IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# Useful common wx libs needed by almost all components. # Useful common wx libs needed by almost all components.
SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
@ -543,10 +540,10 @@ IF(WIN32_STYLE_FIND)
ENDIF(WX_ROOT_DIR) ENDIF(WX_ROOT_DIR)
#===================================================================== #=====================================================================
# UNIX_STYLE_FIND # UNIX_FIND_STYLE
#===================================================================== #=====================================================================
ELSE(WIN32_STYLE_FIND) ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
IF(UNIX_STYLE_FIND) IF(wxWidgets_FIND_STYLE STREQUAL "unix")
#----------------------------------------------------------------- #-----------------------------------------------------------------
# UNIX: Helper MACROS # UNIX: Helper MACROS
#----------------------------------------------------------------- #-----------------------------------------------------------------
@ -729,18 +726,18 @@ ELSE(WIN32_STYLE_FIND)
ENDIF(wxWidgets_CONFIG_EXECUTABLE) ENDIF(wxWidgets_CONFIG_EXECUTABLE)
#===================================================================== #=====================================================================
# Neither UNIX_STYLE_FIND, nor WIN32_STYLE_FIND # Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE
#===================================================================== #=====================================================================
ELSE(UNIX_STYLE_FIND) ELSE(wxWidgets_FIND_STYLE STREQUAL "unix")
IF(NOT wxWidgets_FIND_QUIETLY) IF(NOT wxWidgets_FIND_QUIETLY)
MESSAGE(STATUS MESSAGE(STATUS
"${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n" "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n"
" Platform unknown/unsupported. It's neither WIN32 nor UNIX " " Platform unknown/unsupported. It's neither WIN32 nor UNIX "
"style find." "find style."
) )
ENDIF(NOT wxWidgets_FIND_QUIETLY) ENDIF(NOT wxWidgets_FIND_QUIETLY)
ENDIF(UNIX_STYLE_FIND) ENDIF(wxWidgets_FIND_STYLE STREQUAL "unix")
ENDIF(WIN32_STYLE_FIND) ENDIF(wxWidgets_FIND_STYLE STREQUAL "win32")
# Debug output: # Debug output:
DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}") DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}")