cmake: Fix wxWidgets platfrom detection

wx-config --selected-config gives
x86_64-w64-mingw32-msw-unicode-static-3.2

Which in turn gives wxWidgets port 'x' with "^[msw|qt|gtk|osx]*"
This commit is contained in:
Michal Suchanek 2025-05-10 23:34:52 +02:00 committed by Mark Roszko
parent df33ec79f7
commit fbf0d32391

View File

@ -1007,7 +1007,7 @@ include( ${wxWidgets_USE_FILE} )
# Detect wxWidgets port being used
if( wxWidgets_FIND_STYLE STREQUAL "win32" )
string(REGEX MATCH "^[msw|qt|gtk]*" KICAD_WX_PORT "${WX_CONFIGURATION}")
string(REGEX MATCH "(msw|qt|gtk)" KICAD_WX_PORT "${WX_CONFIGURATION}")
if( KICAD_WX_PORT STREQUAL "qt" )
add_compile_definitions( __WXQT__ )
@ -1015,7 +1015,7 @@ if( wxWidgets_FIND_STYLE STREQUAL "win32" )
add_compile_definitions( __WXGTK__ )
endif()
elseif( _wx_selected_config )
string(REGEX MATCH "^[msw|qt|gtk|osx]*" KICAD_WX_PORT "${_wx_selected_config}")
string(REGEX MATCH "(msw|qt|gtk|osx)" KICAD_WX_PORT "${_wx_selected_config}")
endif()
if( KICAD_WX_PORT )