diff options
author | Craig Sturdy <craig.sturdy@geoteric.com> | 2019-11-12 08:30:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-11-12 15:11:07 (GMT) |
commit | fe54989fcdd03a1f9bd674b31bac3a95a52a0fd5 (patch) | |
tree | 9d1754757119a54d1da2a2f6bc6c0b3cc88de293 | |
parent | c1d5d5eb11e0260ffadda0851ac844ab46b6b179 (diff) | |
download | CMake-fe54989fcdd03a1f9bd674b31bac3a95a52a0fd5.zip CMake-fe54989fcdd03a1f9bd674b31bac3a95a52a0fd5.tar.gz CMake-fe54989fcdd03a1f9bd674b31bac3a95a52a0fd5.tar.bz2 |
FindwxWidgets: Add support for wxQt
-rw-r--r-- | Modules/FindwxWidgets.cmake | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index c813ead..79d12a7 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -243,22 +243,24 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") #------------------------------------------------------------------- # # Get filename components for a configuration. For example, - # if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d - # if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG="" + # if _CONFIGURATION = mswunivud, then _PF="msw", _UNV=univ, _UCD=u _DBG=d + # if _CONFIGURATION = mswu, then _PF="msw", _UNV="", _UCD=u _DBG="" # - macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG) + macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _PF _UNV _UCD _DBG) + DBG_MSG_V(${_CONFIGURATION}) string(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}") - string(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") + string(REGEX REPLACE "[msw|qt].*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") if(${_UCD} STREQUAL ${_CONFIGURATION}) set(${_UCD} "") endif() string(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}") + string(REGEX MATCH "^[msw|qt]*" ${_PF} "${_CONFIGURATION}") endmacro() # # Find libraries associated to a configuration. # - macro(WX_FIND_LIBS _UNV _UCD _DBG) + macro(WX_FIND_LIBS _PF _UNV _UCD _DBG) DBG_MSG_V("m_unv = ${_UNV}") DBG_MSG_V("m_ucd = ${_UCD}") DBG_MSG_V("m_dbg = ${_DBG}") @@ -310,13 +312,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") # Find wxWidgets monolithic library. find_library(WX_mono${_DBG} NAMES - wxmsw${_UNV}31${_UCD}${_DBG} - wxmsw${_UNV}30${_UCD}${_DBG} - wxmsw${_UNV}29${_UCD}${_DBG} - wxmsw${_UNV}28${_UCD}${_DBG} - wxmsw${_UNV}27${_UCD}${_DBG} - wxmsw${_UNV}26${_UCD}${_DBG} - wxmsw${_UNV}25${_UCD}${_DBG} + wx${_PF}${_UNV}31${_UCD}${_DBG} + wx${_PF}${_UNV}30${_UCD}${_DBG} + wx${_PF}${_UNV}29${_UCD}${_DBG} + wx${_PF}${_UNV}28${_UCD}${_DBG} + wx${_PF}${_UNV}27${_UCD}${_DBG} + wx${_PF}${_UNV}26${_UCD}${_DBG} + wx${_PF}${_UNV}25${_UCD}${_DBG} PATHS ${WX_LIB_DIR} NO_DEFAULT_PATH ) @@ -327,13 +329,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") stc ribbon propgrid webview) find_library(WX_${LIB}${_DBG} NAMES - wxmsw${_UNV}31${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}30${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}28${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}27${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}26${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}25${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}31${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}30${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}29${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}28${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}27${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}26${_UCD}${_DBG}_${LIB} + wx${_PF}${_UNV}25${_UCD}${_DBG}_${LIB} PATHS ${WX_LIB_DIR} NO_DEFAULT_PATH ) @@ -512,6 +514,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") if(BUILD_SHARED_LIBS) find_path(wxWidgets_LIB_DIR NAMES + qtu/wx/setup.h msw/wx/setup.h mswd/wx/setup.h mswu/wx/setup.h @@ -533,6 +536,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") else() find_path(wxWidgets_LIB_DIR NAMES + qtu/wx/setup.h msw/wx/setup.h mswd/wx/setup.h mswu/wx/setup.h @@ -571,7 +575,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") endif() # Search for available configuration types. - foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) + foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw qt qtd qtu qtud) set(WX_${CFG}_FOUND FALSE) if(EXISTS ${WX_LIB_DIR}/${CFG}) list(APPEND WX_CONFIGURATION_LIST ${CFG}) @@ -611,7 +615,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") endif() # Get configuration parameters from the name. - WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) + WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} PF UNV UCD DBG) # Set wxWidgets lib setup include directory. if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) @@ -631,7 +635,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") endif() # Find wxWidgets libraries. - WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}") + WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "${DBG}") if(WX_USE_REL_AND_DBG) WX_FIND_LIBS("${UNV}" "${UCD}" "d") endif() |