From fbf0d323910d9d30b0e340a92ca58321bb4dc426 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Sat, 10 May 2025 23:34:52 +0200 Subject: [PATCH] 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]*" --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34dee8cdfc..495142ef1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 )