From c63be93d6927c6dc558e5bc67d8c5812528150f1 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 07:09:37 +0200 Subject: [PATCH 01/18] Revert "[wxwidgets] Remove debug asserts from Release build. (#25240)" This reverts commit 6e16931acdf85ab5476973ba00d8eda733f42858. --- ports/wxcharts/portfile.cmake | 2 -- ports/wxcharts/vcpkg.json | 2 +- ports/wxwidgets/example/CMakeLists.txt | 5 ----- ports/wxwidgets/portfile.cmake | 2 -- ports/wxwidgets/vcpkg.json | 2 +- scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake | 2 -- 6 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ports/wxcharts/portfile.cmake b/ports/wxcharts/portfile.cmake index 5fbb5c35c10d09..7d6534b1a26824 100644 --- a/ports/wxcharts/portfile.cmake +++ b/ports/wxcharts/portfile.cmake @@ -7,8 +7,6 @@ vcpkg_from_github( vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - OPTIONS_RELEASE - -DwxBUILD_DEBUG_LEVEL=0 ) vcpkg_cmake_install() diff --git a/ports/wxcharts/vcpkg.json b/ports/wxcharts/vcpkg.json index 15e320e74b0f94..90226b7e409321 100644 --- a/ports/wxcharts/vcpkg.json +++ b/ports/wxcharts/vcpkg.json @@ -1,6 +1,6 @@ { "name": "wxcharts", - "version-date": "2022-06-16", + "version-date": "2022-07-05", "description": "Chart controls for the wxWidgets cross-platform GUI library", "homepage": "https://www.wxishiko.com/wxCharts", "license": "MIT", diff --git a/ports/wxwidgets/example/CMakeLists.txt b/ports/wxwidgets/example/CMakeLists.txt index 14720cf37e2766..7d5b12dba4cdbe 100644 --- a/ports/wxwidgets/example/CMakeLists.txt +++ b/ports/wxwidgets/example/CMakeLists.txt @@ -2,11 +2,6 @@ cmake_minimum_required(VERSION 3.7) project(wxwidgets-example) -option(wxBUILD_DEBUG_LEVEL "Debug Level" Default) -if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default") - add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}") -endif() - add_executable(main WIN32 popup.cpp) find_package(wxWidgets REQUIRED) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index b8c9d3f54ffc82..32b331623874e7 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -98,8 +98,6 @@ vcpkg_cmake_configure( # The minimum cmake version requirement for Cotire is 2.8.12. # however, we need to declare that the minimum cmake version requirement is at least 3.1 to use CMAKE_PREFIX_PATH as the path to find .pc. -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON - OPTIONS_RELEASE - -DwxBUILD_DEBUG_LEVEL=0 ) vcpkg_cmake_install() diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json index 2d222ef1265a9b..6282ba518e1861 100644 --- a/ports/wxwidgets/vcpkg.json +++ b/ports/wxwidgets/vcpkg.json @@ -1,7 +1,7 @@ { "name": "wxwidgets", "version": "3.1.6", - "port-version": 2, + "port-version": 3, "description": [ "Widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. ", "Set WXWIDGETS_USE_STL in a custom triplet to build with the wxUSE_STL build option.", diff --git a/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake b/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake index 7a1349c56bce1c..d301fa74a15038 100644 --- a/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake +++ b/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake @@ -12,8 +12,6 @@ vcpkg_cmake_configure( ${OPTIONS} -DCMAKE_CONFIG_RUN=1 "-DPRINT_VARS=CMAKE_CONFIG_RUN;wxWidgets_LIBRARIES" - OPTIONS_RELEASE - -DwxBUILD_DEBUG_LEVEL=0 ) vcpkg_cmake_build() From c15ec7b1bf2f23f537a1ad2ae598ee14a8b9511c Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 07:59:12 +0200 Subject: [PATCH 02/18] Update to 3.1.7 --- ports/wxwidgets/nanosvg-ext-depend.patch | 64 +++++++++++------------- ports/wxwidgets/portfile.cmake | 5 +- ports/wxwidgets/vcpkg.json | 3 +- 3 files changed, 33 insertions(+), 39 deletions(-) diff --git a/ports/wxwidgets/nanosvg-ext-depend.patch b/ports/wxwidgets/nanosvg-ext-depend.patch index d9d96639f3f179..5b83abedd3fd02 100644 --- a/ports/wxwidgets/nanosvg-ext-depend.patch +++ b/ports/wxwidgets/nanosvg-ext-depend.patch @@ -1,35 +1,29 @@ -diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake -index 8c9275974f..3758261299 100644 ---- a/build/cmake/init.cmake -+++ b/build/cmake/init.cmake -@@ -615,3 +615,6 @@ if(wxBUILD_PRECOMP) - wx_option_force_value(wxBUILD_PRECOMP OFF) - endif() - endif(wxBUILD_PRECOMP) -+ -+find_package(unofficial-nanosvg CONFIG REQUIRED) -+list(APPEND wxTOOLKIT_LIBRARIES unofficial::nanosvg::nanosvg) -diff --git a/src/generic/bmpsvg.cpp b/src/generic/bmpsvg.cpp -index 76f20dce4c..7a7c24b4dd 100644 ---- a/src/generic/bmpsvg.cpp -+++ b/src/generic/bmpsvg.cpp -@@ -26,7 +26,7 @@ - // your source tree doesn't contain 3rdparty/nanosvg and you should initialize - // and update the corresponding submodule. - #ifdef __has_include -- #if ! __has_include("../../3rdparty/nanosvg/src/nanosvg.h") -+ #if 0 - #error You need to run "git submodule update --init 3rdparty/nanosvg". - #undef wxHAS_SVG - #endif -@@ -60,8 +60,8 @@ - #define NANOSVG_IMPLEMENTATION - #define NANOSVGRAST_IMPLEMENTATION - #define NANOSVG_ALL_COLOR_KEYWORDS --#include "../../3rdparty/nanosvg/src/nanosvg.h" --#include "../../3rdparty/nanosvg/src/nanosvgrast.h" -+#include -+#include - - #ifdef __VISUALC__ - #pragma warning(pop) +diff --git a/build/cmake/lib/nanosvg.cmake b/build/cmake/lib/nanosvg.cmake +index 401bf48..b9e4b57 100644 +--- a/build/cmake/lib/nanosvg.cmake ++++ b/build/cmake/lib/nanosvg.cmake +@@ -16,9 +16,9 @@ elseif(wxUSE_NANOSVG) + set(NANOSVG_INCLUDE_DIRS ) + set(wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL TRUE) + +- find_package(NanoSVG REQUIRED) ++ find_package(unofficial-nanosvg CONFIG REQUIRED) + +- foreach(TARGETNAME NanoSVG::nanosvg NanoSVG::nanosvgrast unofficial::nanosvg) ++ foreach(TARGETNAME unofficial::nanosvg::nanosvg) + if(NOT TARGET ${TARGETNAME}) + continue() + endif() +diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake +index 49c536a..5630526 100644 +--- a/build/cmake/options.cmake ++++ b/build/cmake/options.cmake +@@ -114,7 +114,7 @@ wx_add_thirdparty_library(wxUSE_EXPAT EXPAT "use expat for XML parsing" DEFAULT_ + wx_add_thirdparty_library(wxUSE_LIBJPEG JPEG "use libjpeg (JPEG file format)") + wx_add_thirdparty_library(wxUSE_LIBPNG PNG "use libpng (PNG image format)") + wx_add_thirdparty_library(wxUSE_LIBTIFF TIFF "use libtiff (TIFF file format)") +-wx_add_thirdparty_library(wxUSE_NANOSVG NanoSVG "use NanoSVG for rasterizing SVG") ++wx_add_thirdparty_library(wxUSE_NANOSVG unofficial-nanosvg "use NanoSVG for rasterizing SVG") + + wx_option(wxUSE_LIBLZMA "use LZMA compression" OFF) + set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBLZMA "use liblzma for LZMA compression") diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 32b331623874e7..ffd07ee928fdde 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wxWidgets/wxWidgets - REF 35a6d7b15fedfdb5198bb6c28b31cda33b2c2a76 #v3.1.6-final - SHA512 f42b97a695e037130da9935e3abf117c0720325f194fcdabace95fa16a5ca06d49e35db9616bb0ef16600044397739459551a6276f3c239bd4fc160ecb6cdc16 + REF v3.1.7 + SHA512 d6c9613b82a7e697b60217ba8fe9be4406ce7fad1f8d2d16cbf94c9aa9b5a38f1f3e175cb7a80dac8a57196dd6aa2fc3db83b4099a4257bb1a79707002db4af2 HEAD_REF master PATCHES install-layout.patch @@ -89,6 +89,7 @@ vcpkg_cmake_configure( -DwxUSE_LIBJPEG=sys -DwxUSE_LIBPNG=sys -DwxUSE_LIBTIFF=sys + -DwxUSE_NANOSVG=sys -DwxUSE_SECRETSTORE=FALSE -DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON -DwxUSE_STL=${WXWIDGETS_USE_STL} diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json index 6282ba518e1861..63cf33089d8c12 100644 --- a/ports/wxwidgets/vcpkg.json +++ b/ports/wxwidgets/vcpkg.json @@ -1,7 +1,6 @@ { "name": "wxwidgets", - "version": "3.1.6", - "port-version": 3, + "version": "3.1.7", "description": [ "Widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. ", "Set WXWIDGETS_USE_STL in a custom triplet to build with the wxUSE_STL build option.", From a9714cc19ddbaa5da3b1f03e2ec9d0eff9a2b08d Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 08:13:29 +0200 Subject: [PATCH 03/18] Update installation layout --- ports/wxwidgets/install-layout.patch | 44 +++++++++++++++++----------- ports/wxwidgets/portfile.cmake | 1 - 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/ports/wxwidgets/install-layout.patch b/ports/wxwidgets/install-layout.patch index a0676bcb330fa5..38045773d19ac1 100644 --- a/ports/wxwidgets/install-layout.patch +++ b/ports/wxwidgets/install-layout.patch @@ -1,5 +1,27 @@ diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake -index b5175236e2..8c9275974f 100644 +index 32bd959..74f31ed 100644 +--- a/build/cmake/functions.cmake ++++ b/build/cmake/functions.cmake +@@ -14,7 +14,7 @@ include(CMakePrintHelpers) + + # Use the MSVC/makefile naming convention, or the configure naming convention, + # this is the same check as used in FindwxWidgets. +-if(WIN32 AND NOT CYGWIN AND NOT MSYS) ++if(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT MINGW) + set(WIN32_MSVC_NAMING 1) + else() + set(WIN32_MSVC_NAMING 0) +@@ -418,7 +418,7 @@ macro(wx_add_library name) + set_target_properties(${name} PROPERTIES PROJECT_LABEL ${name_short}) + + # Setup install +- set(runtime_dir "lib") ++ set(runtime_dir "bin") + if(WIN32 AND NOT WIN32_MSVC_NAMING) + # configure puts the .dll in the bin directory + set(runtime_dir "bin") +diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake +index 3ff14ab..7bd00d3 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -146,7 +146,7 @@ if(WIN32) @@ -7,24 +29,12 @@ index b5175236e2..8c9275974f 100644 endif() -if(WIN32_MSVC_NAMING) -+if(WIN32_MSVC_NAMING AND NOT wxBUILD_DISABLE_PLATFORM_LIB_DIR) ++if(0) if(wxBUILD_SHARED) set(lib_suffix "_dll") else() -index 9e6aafa900..defd196d2e 100644 ---- a/build/cmake/functions.cmake -+++ b/build/cmake/functions.cmake -@@ -417,7 +417,7 @@ macro(wx_add_library name) - - # Setup install - set(runtime_dir "lib") -- if(WIN32 AND NOT WIN32_MSVC_NAMING) -+ if(VCPKG_TOOLCHAIN OR (WIN32 AND NOT WIN32_MSVC_NAMING)) - # configure puts the .dll in the bin directory - set(runtime_dir "bin") - endif() diff --git a/build/cmake/install.cmake b/build/cmake/install.cmake -index 7902646ef4..04ccd1aba7 100644 +index 84cb9f5..e2f460a 100644 --- a/build/cmake/install.cmake +++ b/build/cmake/install.cmake @@ -48,7 +48,7 @@ else() @@ -37,10 +47,10 @@ index 7902646ef4..04ccd1aba7 100644 ${CMAKE_INSTALL_PREFIX}/bin/wx-config \ )" diff --git a/build/cmake/utils/CMakeLists.txt b/build/cmake/utils/CMakeLists.txt -index 2b3a22834d..e0e964db9d 100644 +index d6b3465..870897b 100644 --- a/build/cmake/utils/CMakeLists.txt +++ b/build/cmake/utils/CMakeLists.txt -@@ -41,7 +41,7 @@ if(wxUSE_XRC) +@@ -38,7 +38,7 @@ if(wxUSE_XRC) endif() install(CODE "execute_process( \ diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index ffd07ee928fdde..c22a418a525f61 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -91,7 +91,6 @@ vcpkg_cmake_configure( -DwxUSE_LIBTIFF=sys -DwxUSE_NANOSVG=sys -DwxUSE_SECRETSTORE=FALSE - -DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON -DwxUSE_STL=${WXWIDGETS_USE_STL} -DwxUSE_STD_CONTAINERS=${WXWIDGETS_USE_STD_CONTAINERS} ${OPTIONS} From 8118a537d2a5ddf273f6ef1eac8d4eb7d46c3c9e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 08:27:36 +0200 Subject: [PATCH 04/18] Upstream CMake export is not ready for use --- ports/wxwidgets/portfile.cmake | 6 ++++++ ports/wxwidgets/vcpkg.json | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index c22a418a525f61..32d4cff87ffe95 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -102,6 +102,12 @@ vcpkg_cmake_configure( vcpkg_cmake_install() +# The CMake export is not ready for use: It lacks a config file. +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake +) + set(tools wxrc) if(VCPKG_TARGET_IS_MINGW OR NOT VCPKG_TARGET_IS_WINDOWS) list(APPEND tools wxrc-3.1) diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json index 63cf33089d8c12..78027a63251fe3 100644 --- a/ports/wxwidgets/vcpkg.json +++ b/ports/wxwidgets/vcpkg.json @@ -25,10 +25,6 @@ "name": "vcpkg-cmake", "host": true }, - { - "name": "vcpkg-cmake-config", - "host": true - }, "zlib" ], "default-features": [ From 6d6cf767924cef4f97de4ca458b4254073df534e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 08:47:47 +0200 Subject: [PATCH 05/18] Update versions --- versions/baseline.json | 6 +++--- versions/w-/wxcharts.json | 5 +++++ versions/w-/wxwidgets.json | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 8382ef36d3e2a9..a09000047d2d9e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7637,12 +7637,12 @@ "port-version": 0 }, "wxcharts": { - "baseline": "2022-06-16", + "baseline": "2022-07-05", "port-version": 0 }, "wxwidgets": { - "baseline": "3.1.6", - "port-version": 2 + "baseline": "3.1.7", + "port-version": 0 }, "x-plane": { "baseline": "3.0.3", diff --git a/versions/w-/wxcharts.json b/versions/w-/wxcharts.json index 8369741d8a4429..6804312bdfad21 100644 --- a/versions/w-/wxcharts.json +++ b/versions/w-/wxcharts.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "03603fb0a73094f361edd6b4f074b661654a19b2", + "version-date": "2022-07-05", + "port-version": 0 + }, { "git-tree": "0d4c30893a28468249d63c0f4c1a1a9e231ac817", "version-date": "2022-06-16", diff --git a/versions/w-/wxwidgets.json b/versions/w-/wxwidgets.json index 0f3a4e1566e334..00d383b3a90360 100644 --- a/versions/w-/wxwidgets.json +++ b/versions/w-/wxwidgets.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1c1ba4f0dc324502315155316e1fc69eb12033e6", + "version": "3.1.7", + "port-version": 0 + }, { "git-tree": "27a68f45cbdc9ab88864c353c7a8b91f76153509", "version": "3.1.6", From e88b5937252ef909b260d2d52c2d82021b520307 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 19:32:05 +0200 Subject: [PATCH 06/18] Remove obsolete patch --- ports/wxwidgets/mingw-output-name.patch | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 ports/wxwidgets/mingw-output-name.patch diff --git a/ports/wxwidgets/mingw-output-name.patch b/ports/wxwidgets/mingw-output-name.patch deleted file mode 100644 index 772ac0743d4fdd..00000000000000 --- a/ports/wxwidgets/mingw-output-name.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake -index 902b7c5..ad8d1c4 100644 ---- a/build/cmake/functions.cmake -+++ b/build/cmake/functions.cmake -@@ -184,7 +184,6 @@ function(wx_set_target_properties target_name is_base) - set_target_properties(${target_name} - PROPERTIES - OUTPUT_NAME "wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}" -- OUTPUT_NAME_DEBUG "wx_${lib_toolkit}${lib_unicode}d${lib_flavour}${lib_suffix}-${lib_version}" - PREFIX "lib" - ) - endif() -@@ -486,7 +485,7 @@ function(wx_set_builtin_target_properties target_name) - PROPERTIES - OUTPUT_NAME ${target_name}${lib_unicode}${postfix} - ) -- if(WIN32) -+ if(WIN32 AND NOT MINGW) - set_target_properties(${target_name} - PROPERTIES - OUTPUT_NAME_DEBUG ${target_name}${lib_unicode}d From 0c36289fef0c9c500b94f3860bad1c0fcd1c6a85 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 19:42:13 +0200 Subject: [PATCH 07/18] Use msvc layout for mingw on windows --- ports/wxwidgets/install-layout.patch | 35 ----------------------- ports/wxwidgets/portfile.cmake | 2 +- ports/wxwidgets/vcpkg-cmake-wrapper.cmake | 20 ++++++------- 3 files changed, 10 insertions(+), 47 deletions(-) diff --git a/ports/wxwidgets/install-layout.patch b/ports/wxwidgets/install-layout.patch index 38045773d19ac1..e70f71dd495c47 100644 --- a/ports/wxwidgets/install-layout.patch +++ b/ports/wxwidgets/install-layout.patch @@ -2,15 +2,6 @@ diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index 32bd959..74f31ed 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake -@@ -14,7 +14,7 @@ include(CMakePrintHelpers) - - # Use the MSVC/makefile naming convention, or the configure naming convention, - # this is the same check as used in FindwxWidgets. --if(WIN32 AND NOT CYGWIN AND NOT MSYS) -+if(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT MINGW) - set(WIN32_MSVC_NAMING 1) - else() - set(WIN32_MSVC_NAMING 0) @@ -418,7 +418,7 @@ macro(wx_add_library name) set_target_properties(${name} PROPERTIES PROJECT_LABEL ${name_short}) @@ -33,29 +24,3 @@ index 3ff14ab..7bd00d3 100644 if(wxBUILD_SHARED) set(lib_suffix "_dll") else() -diff --git a/build/cmake/install.cmake b/build/cmake/install.cmake -index 84cb9f5..e2f460a 100644 ---- a/build/cmake/install.cmake -+++ b/build/cmake/install.cmake -@@ -48,7 +48,7 @@ else() - - install(DIRECTORY DESTINATION "bin") - install(CODE "execute_process( \ -- COMMAND ${CMAKE_COMMAND} -E create_symlink \ -+ COMMAND ${CMAKE_COMMAND} -E copy \ - ${CMAKE_INSTALL_PREFIX}/lib/wx/config/${wxBUILD_FILE_ID} \ - ${CMAKE_INSTALL_PREFIX}/bin/wx-config \ - )" -diff --git a/build/cmake/utils/CMakeLists.txt b/build/cmake/utils/CMakeLists.txt -index d6b3465..870897b 100644 ---- a/build/cmake/utils/CMakeLists.txt -+++ b/build/cmake/utils/CMakeLists.txt -@@ -38,7 +38,7 @@ if(wxUSE_XRC) - endif() - - install(CODE "execute_process( \ -- COMMAND ${CMAKE_COMMAND} -E create_symlink \ -+ COMMAND ${CMAKE_COMMAND} -E copy \ - ${CMAKE_INSTALL_PREFIX}/bin/${wxrc_output_name}${EXE_SUFFIX} \ - ${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \ - )" diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 32d4cff87ffe95..a6026dcda432d8 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -109,7 +109,7 @@ file(REMOVE_RECURSE ) set(tools wxrc) -if(VCPKG_TARGET_IS_MINGW OR NOT VCPKG_TARGET_IS_WINDOWS) +if(NOT VCPKG_TARGET_IS_WINDOWS) list(APPEND tools wxrc-3.1) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") file(RENAME "${CURRENT_PACKAGES_DIR}/bin/wx-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/wx-config") diff --git a/ports/wxwidgets/vcpkg-cmake-wrapper.cmake b/ports/wxwidgets/vcpkg-cmake-wrapper.cmake index f4a1403eee02c2..cbdd338090f6cf 100644 --- a/ports/wxwidgets/vcpkg-cmake-wrapper.cmake +++ b/ports/wxwidgets/vcpkg-cmake-wrapper.cmake @@ -7,18 +7,11 @@ set(wxWidgets_ROOT_DIR "${_vcpkg_wx_root}" CACHE INTERNAL "") set(WX_ROOT_DIR "${_vcpkg_wx_root}" CACHE INTERNAL "") unset(_vcpkg_wx_root) -if(MINGW) - # Force FindwxWidgets.cmake unix mode, matching mingw install layout - set(_vcpkg_wxwidgets_backup_crosscompiling "${CMAKE_CROSSCOMPILING}") - set(CMAKE_CROSSCOMPILING 1) -elseif(WIN32) - # Force FindwxWidgets.cmake win32 mode, matching win32 install layout +if(WIN32 AND CMAKE_HOST_WIN32) + # FindwxWidgets.cmake win32 mode, multi-config + # Force FindwxWidgets.cmake win32 mode for all windows targets built on windows set(_vcpkg_wxwidgets_backup_crosscompiling "${CMAKE_CROSSCOMPILING}") set(CMAKE_CROSSCOMPILING 0) -endif() - -if(WIN32 AND NOT CMAKE_CROSSCOMPILING) - # FindwxWidgets.cmake win32 mode, multi-config # Get cache variables for debug libs set(wxWidgets_LIB_DIR "${wxWidgets_ROOT_DIR}/debug/lib" CACHE INTERNAL "") set(WX_LIB_DIR "${wxWidgets_LIB_DIR}" CACHE INTERNAL "") @@ -30,6 +23,11 @@ if(WIN32 AND NOT CMAKE_CROSSCOMPILING) set(wxWidgets_LIB_DIR "${wxWidgets_ROOT_DIR}/lib" CACHE INTERNAL "") else() # FindwxWidgets.cmake unix mode, single-config + if(MINGW) + # Force FindwxWidgets.cmake unix mode for mingw cross builds + set(_vcpkg_wxwidgets_backup_crosscompiling "${CMAKE_CROSSCOMPILING}") + set(CMAKE_CROSSCOMPILING 1) + endif() set(_vcpkg_wxconfig "") if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR "Debug" IN_LIST MAP_IMPORTED_CONFIG_${CMAKE_BUILD_TYPE}) # Debug @@ -53,7 +51,7 @@ if(DEFINED _vcpkg_wxwidgets_backup_crosscompiling) unset(_vcpkg_wxwidgets_backup_crosscompiling) endif() -if(WIN32 AND NOT MINGW AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") +if(WIN32 AND CMAKE_HOST_WIN32 AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") find_package(EXPAT QUIET) find_package(JPEG QUIET) find_package(PNG QUIET) From ce04c3f1c5d005d1ee9a34e50c767073df9760d1 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 20:00:29 +0200 Subject: [PATCH 08/18] Add debug-support feature --- ports/wxwidgets/portfile.cmake | 7 +++++++ ports/wxwidgets/vcpkg.json | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index a6026dcda432d8..fcdfdeab6dcc96 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -38,6 +38,11 @@ vcpkg_check_features( vcpkg_find_acquire_program(PKGCONFIG) +set(OPTIONS_RELEASE "") +if("debug-support" IN_LIST FEATURES) + list(APPEND OPTIONS_RELEASE "-DwxBUILD_DEBUG_LEVEL=0") +endif() + set(OPTIONS "") if(VCPKG_TARGET_IS_OSX) list(APPEND OPTIONS -DCOTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES=9999) @@ -98,6 +103,8 @@ vcpkg_cmake_configure( # The minimum cmake version requirement for Cotire is 2.8.12. # however, we need to declare that the minimum cmake version requirement is at least 3.1 to use CMAKE_PREFIX_PATH as the path to find .pc. -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON + OPTIONS_RELEASE + ${OPTIONS_RELEASE} ) vcpkg_cmake_install() diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json index 78027a63251fe3..2075c208508457 100644 --- a/ports/wxwidgets/vcpkg.json +++ b/ports/wxwidgets/vcpkg.json @@ -28,9 +28,13 @@ "zlib" ], "default-features": [ + "debug-support", "sound" ], "features": { + "debug-support": { + "description": "Enable wxWidgets debugging support hooks even for release builds (wxDEBUG_LEVEL 1)" + }, "example": { "description": "Example source code and CMake project" }, From c66ab6ecbc63161559720bff0d05b9ef9206c27d Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 20:01:44 +0200 Subject: [PATCH 09/18] Update versions --- versions/w-/wxwidgets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/w-/wxwidgets.json b/versions/w-/wxwidgets.json index 00d383b3a90360..2ab8aa017b70bf 100644 --- a/versions/w-/wxwidgets.json +++ b/versions/w-/wxwidgets.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1c1ba4f0dc324502315155316e1fc69eb12033e6", + "git-tree": "76ab811cdc91bcb7de289cfe0ac3ea6cfb3ef9ea", "version": "3.1.7", "port-version": 0 }, From ae74c7018b4c13a807dabc4bdffe5c8acad69706 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 20:26:41 +0200 Subject: [PATCH 10/18] Fix condition --- ports/wxwidgets/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index fcdfdeab6dcc96..e48b85cc82a00d 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -39,7 +39,7 @@ vcpkg_check_features( vcpkg_find_acquire_program(PKGCONFIG) set(OPTIONS_RELEASE "") -if("debug-support" IN_LIST FEATURES) +if(NOT "debug-support" IN_LIST FEATURES) list(APPEND OPTIONS_RELEASE "-DwxBUILD_DEBUG_LEVEL=0") endif() From 6a5b1938676401be94cf4debea71dac0ebda081f Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 5 Jul 2022 20:27:41 +0200 Subject: [PATCH 11/18] Update versions --- scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake | 1 + versions/w-/wxwidgets.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake b/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake index d301fa74a15038..146da2371f341e 100644 --- a/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake +++ b/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_cmake_configure( ${OPTIONS} -DCMAKE_CONFIG_RUN=1 "-DPRINT_VARS=CMAKE_CONFIG_RUN;wxWidgets_LIBRARIES" + --trace-expand ) vcpkg_cmake_build() diff --git a/versions/w-/wxwidgets.json b/versions/w-/wxwidgets.json index 2ab8aa017b70bf..c8c52a64c5ad92 100644 --- a/versions/w-/wxwidgets.json +++ b/versions/w-/wxwidgets.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "76ab811cdc91bcb7de289cfe0ac3ea6cfb3ef9ea", + "git-tree": "1ba81ecf9e9d5e054830cd68b092a6cac5e8b1d4", "version": "3.1.7", "port-version": 0 }, From 1ced1e9f3071c9507c5e234301d52c7fac5f427f Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 06:15:06 +0200 Subject: [PATCH 12/18] Restore symlink patch --- ports/wxwidgets/install-layout.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ports/wxwidgets/install-layout.patch b/ports/wxwidgets/install-layout.patch index e70f71dd495c47..589a0adb19d388 100644 --- a/ports/wxwidgets/install-layout.patch +++ b/ports/wxwidgets/install-layout.patch @@ -24,3 +24,29 @@ index 3ff14ab..7bd00d3 100644 if(wxBUILD_SHARED) set(lib_suffix "_dll") else() +diff --git a/build/cmake/install.cmake b/build/cmake/install.cmake +index 84cb9f5..e2f460a 100644 +--- a/build/cmake/install.cmake ++++ b/build/cmake/install.cmake +@@ -48,7 +48,7 @@ else() + + install(DIRECTORY DESTINATION "bin") + install(CODE "execute_process( \ +- COMMAND ${CMAKE_COMMAND} -E create_symlink \ ++ COMMAND ${CMAKE_COMMAND} -E copy \ + ${CMAKE_INSTALL_PREFIX}/lib/wx/config/${wxBUILD_FILE_ID} \ + ${CMAKE_INSTALL_PREFIX}/bin/wx-config \ + )" +diff --git a/build/cmake/utils/CMakeLists.txt b/build/cmake/utils/CMakeLists.txt +index d6b3465..870897b 100644 +--- a/build/cmake/utils/CMakeLists.txt ++++ b/build/cmake/utils/CMakeLists.txt +@@ -38,7 +38,7 @@ if(wxUSE_XRC) + endif() + + install(CODE "execute_process( \ +- COMMAND ${CMAKE_COMMAND} -E create_symlink \ ++ COMMAND ${CMAKE_COMMAND} -E copy \ + ${CMAKE_INSTALL_PREFIX}/bin/${wxrc_output_name}${EXE_SUFFIX} \ + ${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \ + )" From 67bc1483eb223eb5304a19e4e6f9c4e2f18436ae Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 06:15:37 +0200 Subject: [PATCH 13/18] Update versions --- versions/w-/wxwidgets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/w-/wxwidgets.json b/versions/w-/wxwidgets.json index c8c52a64c5ad92..9962701003d0f5 100644 --- a/versions/w-/wxwidgets.json +++ b/versions/w-/wxwidgets.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1ba81ecf9e9d5e054830cd68b092a6cac5e8b1d4", + "git-tree": "ce8c447a1a2cfa66c4a81a855a7ed343acf299d9", "version": "3.1.7", "port-version": 0 }, From f2c61ee33e62432c8858ec05af7816c5fa6eaab7 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 06:24:59 +0200 Subject: [PATCH 14/18] Remove trace option from test port --- scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake b/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake index 146da2371f341e..d301fa74a15038 100644 --- a/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake +++ b/scripts/test_ports/vcpkg-ci-wxwidgets/portfile.cmake @@ -12,7 +12,6 @@ vcpkg_cmake_configure( ${OPTIONS} -DCMAKE_CONFIG_RUN=1 "-DPRINT_VARS=CMAKE_CONFIG_RUN;wxWidgets_LIBRARIES" - --trace-expand ) vcpkg_cmake_build() From feca77755d85c97c273017e19cf15c3bd09f103d Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 08:39:54 +0200 Subject: [PATCH 15/18] Enable testing without feature debug-support --- scripts/test_ports/vcpkg-ci-wxwidgets/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test_ports/vcpkg-ci-wxwidgets/vcpkg.json b/scripts/test_ports/vcpkg-ci-wxwidgets/vcpkg.json index 188d1069db05a9..989d47a579027a 100644 --- a/scripts/test_ports/vcpkg-ci-wxwidgets/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-wxwidgets/vcpkg.json @@ -9,6 +9,7 @@ }, { "name": "wxwidgets", + "default-features": false, "features": [ "example" ] From 06ff3fb0ca7b6e4ad20a382d09023f541d024d77 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 09:08:40 +0200 Subject: [PATCH 16/18] Fixup defaults for using without debug support --- ports/wxwidgets/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index e48b85cc82a00d..7b816d4993515c 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -187,6 +187,14 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/mswud/wx/setup.h") ) endif() +if(NOT "debug-support" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_HOST_IS_WINDOWS) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/wx/debug.h" "#define wxDEBUG_LEVEL 1" "#define wxDEBUG_LEVEL 0") + else() + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/wx-3.1/wx/debug.h" "#define wxDEBUG_LEVEL 1" "#define wxDEBUG_LEVEL 0") + endif() +endif() + if("example" IN_LIST FEATURES) file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/example/CMakeLists.txt" From 2783c10c71c0bfc46948bd4b8ed14966233084eb Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 09:11:17 +0200 Subject: [PATCH 17/18] Expect wxrc-3.1 for mingw cross builds ("unix" layout) --- ports/wxwidgets/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 7b816d4993515c..f305f476ffdf25 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -116,7 +116,7 @@ file(REMOVE_RECURSE ) set(tools wxrc) -if(NOT VCPKG_TARGET_IS_WINDOWS) +if(NOT VCPKG_TARGET_IS_WINDOWS OR NOT VCPKG_HOST_IS_WINDOWS) list(APPEND tools wxrc-3.1) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") file(RENAME "${CURRENT_PACKAGES_DIR}/bin/wx-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/wx-config") From 18b04161272d5ef9e0c8569728ef0ccb6e0f2a58 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Jul 2022 09:17:03 +0200 Subject: [PATCH 18/18] Update versions --- versions/w-/wxwidgets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/w-/wxwidgets.json b/versions/w-/wxwidgets.json index 9962701003d0f5..41c90fb00f0fc7 100644 --- a/versions/w-/wxwidgets.json +++ b/versions/w-/wxwidgets.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ce8c447a1a2cfa66c4a81a855a7ed343acf299d9", + "git-tree": "2610601e9e585455bc709f29636f79b5ad9382a2", "version": "3.1.7", "port-version": 0 },