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:
Rafael Kitover 2019-02-22 08:50:04 -08:00
parent 0674b41b6c
commit 6e76fcefef
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 2 additions and 2 deletions

View File

@ -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