cmake: fix finding 32 bit wxWidgets on gentoo
Generalize regex and glob against `wx/config` scripts in `Toolchain-cross-m32.cmake` to work on gentoo, which can append the `-gtk3` suffix. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
0674b41b6c
commit
6e76fcefef
|
@ -21,14 +21,14 @@ IF(EXISTS ${LIB32}/wx/config)
|
|||
|
||||
SET(MAX_WX_VERSION 0.0)
|
||||
FOREACH(WX_INSTALL ${WX_INSTALLS})
|
||||
STRING(REGEX MATCH "[0-9]+(\\.[0-9]+)+\$" WX_VERSION ${WX_INSTALL})
|
||||
STRING(REGEX MATCH "[0-9]+(\\.[0-9]+)+" WX_VERSION ${WX_INSTALL})
|
||||
|
||||
IF(WX_VERSION VERSION_GREATER MAX_WX_VERSION)
|
||||
SET(MAX_WX_VERSION ${WX_VERSION})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
FILE(GLOB WX_INSTALL_CONFIGS "${LIB32}/wx/config/*${MAX_WX_VERSION}")
|
||||
FILE(GLOB WX_INSTALL_CONFIGS "${LIB32}/wx/config/*${MAX_WX_VERSION}*")
|
||||
LIST(GET WX_INSTALL_CONFIGS 0 WX_INSTALL_CONFIG)
|
||||
|
||||
SET(WX_CONFIG_TRANSFORM_SCRIPT_LINES
|
||||
|
|
Loading…
Reference in New Issue