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/install-layout.patch b/ports/wxwidgets/install-layout.patch index a0676bcb330fa5..589a0adb19d388 100644 --- a/ports/wxwidgets/install-layout.patch +++ b/ports/wxwidgets/install-layout.patch @@ -1,5 +1,18 @@ 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 +@@ -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 +20,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 +38,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/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 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 b8c9d3f54ffc82..f305f476ffdf25 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 @@ -38,6 +38,11 @@ vcpkg_check_features( vcpkg_find_acquire_program(PKGCONFIG) +set(OPTIONS_RELEASE "") +if(NOT "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) @@ -89,8 +94,8 @@ 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} -DwxUSE_STD_CONTAINERS=${WXWIDGETS_USE_STD_CONTAINERS} ${OPTIONS} @@ -99,13 +104,19 @@ vcpkg_cmake_configure( # 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 + ${OPTIONS_RELEASE} ) 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) +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") @@ -176,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" 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) diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json index 2d222ef1265a9b..2075c208508457 100644 --- a/ports/wxwidgets/vcpkg.json +++ b/ports/wxwidgets/vcpkg.json @@ -1,7 +1,6 @@ { "name": "wxwidgets", - "version": "3.1.6", - "port-version": 2, + "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.", @@ -26,16 +25,16 @@ "name": "vcpkg-cmake", "host": true }, - { - "name": "vcpkg-cmake-config", - "host": true - }, "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" }, 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() 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" ] 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..41c90fb00f0fc7 100644 --- a/versions/w-/wxwidgets.json +++ b/versions/w-/wxwidgets.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2610601e9e585455bc709f29636f79b5ad9382a2", + "version": "3.1.7", + "port-version": 0 + }, { "git-tree": "27a68f45cbdc9ab88864c353c7a8b91f76153509", "version": "3.1.6",