diff --git a/ports/wxwidgets/fix-wxconfig-libs-output.patch b/ports/wxwidgets/fix-wxconfig-libs-output.patch new file mode 100644 index 00000000000000..37762f9165d055 --- /dev/null +++ b/ports/wxwidgets/fix-wxconfig-libs-output.patch @@ -0,0 +1,46 @@ +diff --git a/build/cmake/config.cmake b/build/cmake/config.cmake +index 91d11ac..4e22ee9 100644 +--- a/build/cmake/config.cmake ++++ b/build/cmake/config.cmake +@@ -41,7 +41,40 @@ macro(wx_get_dependencies var lib) + endif() + set(dep_name "-l${dep_name}") + else() +- get_filename_component(dep_name ${dep} NAME) ++ if (CMAKE_BUILD_TYPE STREQUAL "Release") ++ # For "$<$:" ++ set(CONFIG_TYPE_INVERT "CONFIG:DEBUG>:") ++ else() ++ # For "$<$>:" ++ set(CONFIG_TYPE_INVERT "CONFIG:DEBUG>>:") ++ endif() ++ if (dep MATCHES "${CONFIG_TYPE_INVERT}") ++ continue() ++ endif() ++ string(REGEX REPLACE "^.+>:(.+)>$" "\\1" dep_path ${dep}) ++ if (NOT dep_path) ++ set(dep_name ${dep}) ++ else() ++ string(REGEX MATCH "^-.*$" ADDED_PREFIX ${dep_path}) ++ if (ADDED_PREFIX) ++ set(dep_name ${dep_path}) ++ else() ++ get_filename_component(abs_path ${dep_path} PATH) ++ if (NOT abs_path) ++ string(REGEX MATCH "^lib(.*).a$" CURR_STATIC_NAME ${dep_path}) ++ string(REGEX MATCH "^lib(.*).so$" CURR_DYNAMIC_NAME ${dep_path}) ++ if (CURR_STATIC_NAME) ++ set(dep_name "-l${CURR_STATIC_NAME}") ++ elseif (CURR_DYNAMIC_NAME) ++ set(dep_name "-l${CURR_DYNAMIC_NAME}") ++ else() ++ set(dep_name "-l${dep_path}") ++ endif() ++ else() ++ set(dep_name ${dep_path}) ++ endif() ++ endif() ++ endif() + endif() + wx_string_append(${var} "${dep_name} ") + endforeach() diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 8b2050e2d54d6a..9b16f885d9e104 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( PATCHES disable-platform-lib-dir.patch fix-build.patch + fix-wxconfig-libs-output.patch ) set(OPTIONS) diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json index c7464fe1435e19..4f021c5d62d489 100644 --- a/ports/wxwidgets/vcpkg.json +++ b/ports/wxwidgets/vcpkg.json @@ -1,7 +1,7 @@ { "name": "wxwidgets", "version-semver": "3.1.5", - "port-version": 2, + "port-version": 3, "description": "a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications.", "homepage": "https://github.com/wxWidgets/wxWidgets", "supports": "!uwp",