aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2021-02-08 18:30:48 -0800
committerGitHub <noreply@github.com>2021-02-08 18:30:48 -0800
commitea11604579181b0ff790be223ee3ded3068142f9 (patch)
tree59029f22c2752728954c3301f715ba9e07d8d363
parent5957dcb91255b962c484093e33bc9414b6f3e29c (diff)
downloadvcpkg-ea11604579181b0ff790be223ee3ded3068142f9.tar.gz
vcpkg-ea11604579181b0ff790be223ee3ded3068142f9.zip
[wxwidgets] Fix #4756 (#13361)
* [wxwidgets] Fix #4756 * [wxwidgets] Avoid replacing FindwxWidgets from CMake * [wxwidgets] Provide usage information * [gppanel] Use built-in CMake module * [wxchartdir] Use built-in CMake module * [wxwidgets] Fixup for applocal-ing * [wxwidgets] Fix osx builds * Update port_versions * [gppanel][wxchartdir][wxwidgets] Change versioning schemas Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
-rw-r--r--ports/gppanel/CMakeLists.txt2
-rw-r--r--ports/gppanel/CONTROL5
-rw-r--r--ports/gppanel/portfile.cmake16
-rw-r--r--ports/gppanel/usage4
-rw-r--r--ports/gppanel/vcpkg.json10
-rw-r--r--ports/wxchartdir/CONTROL5
-rw-r--r--ports/wxchartdir/portfile.cmake13
-rw-r--r--ports/wxchartdir/vcpkg.json11
-rw-r--r--ports/wxwidgets/CONTROL7
-rw-r--r--ports/wxwidgets/portfile.cmake32
-rw-r--r--ports/wxwidgets/usage5
-rw-r--r--ports/wxwidgets/vcpkg-cmake-wrapper.cmake19
-rw-r--r--ports/wxwidgets/vcpkg.json14
-rw-r--r--versions/baseline.json6
-rw-r--r--versions/g-/gppanel.json5
-rw-r--r--versions/w-/wxchartdir.json5
-rw-r--r--versions/w-/wxwidgets.json5
17 files changed, 102 insertions, 62 deletions
diff --git a/ports/gppanel/CMakeLists.txt b/ports/gppanel/CMakeLists.txt
index ba3f22f7a..e300f2854 100644
--- a/ports/gppanel/CMakeLists.txt
+++ b/ports/gppanel/CMakeLists.txt
@@ -26,7 +26,7 @@ install(TARGETS gpPanel EXPORT gpPanel-config
install(EXPORT gpPanel-config DESTINATION share/cmake/gpPanel)
-foreach (HEADER ${HEADERS} )
+foreach(HEADER ${HEADERS})
get_filename_component(HEADER_DIR ${HEADER} DIRECTORY)
install(FILES include/${HEADER} DESTINATION include/gpPanel/${HEADER_DIR})
endforeach()
diff --git a/ports/gppanel/CONTROL b/ports/gppanel/CONTROL
deleted file mode 100644
index 5b6bfcbbe..000000000
--- a/ports/gppanel/CONTROL
+++ /dev/null
@@ -1,5 +0,0 @@
-Source: gppanel
-Version: 2020-05-20
-Build-Depends: wxwidgets
-Homepage: https://github.com/woollybah/gppanel
-Description: gpPanel is chart library for wxWidget. It inheritance from wxPanel and use modified wxMathPlot library at chart engine.
diff --git a/ports/gppanel/portfile.cmake b/ports/gppanel/portfile.cmake
index d86ac09ed..b05377133 100644
--- a/ports/gppanel/portfile.cmake
+++ b/ports/gppanel/portfile.cmake
@@ -11,22 +11,9 @@ vcpkg_from_github(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-vcpkg_from_github(
- OUT_SOURCE_PATH VCPKG_WX_FIND_SOURCE_PATH
- REPO CaeruleusAqua/vcpkg-wx-find
- REF 17993e942f677799b488a06ca659a8e46ff272c9
- SHA512 0fe07d3669f115c9b6a761abd7743f87e67f24d1eae3f3abee4715fa4d6b76af0d1ea3a4bd82dbdbed430ae50295e1722615ce0ee7d46182125f5048185ee153
- HEAD_REF master
-)
-
-file(COPY ${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH})
-file(COPY ${CMAKE_ROOT}/Modules/FindPackageMessage.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH})
-
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS
- -DCMAKE_MODULE_PATH=${VCPKG_WX_FIND_SOURCE_PATH}
)
vcpkg_install_cmake()
@@ -36,5 +23,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/gpPanel)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/gpPanel/copyright COPYONLY)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/gpPanel)
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/gppanel/copyright COPYONLY)
diff --git a/ports/gppanel/usage b/ports/gppanel/usage
deleted file mode 100644
index 1ad1e6c42..000000000
--- a/ports/gppanel/usage
+++ /dev/null
@@ -1,4 +0,0 @@
-The package gppanel provides CMake targets:
-
- find_package(gpPanel CONFIG REQUIRED)
- target_link_libraries(main PRIVATE gpPanel)
diff --git a/ports/gppanel/vcpkg.json b/ports/gppanel/vcpkg.json
new file mode 100644
index 000000000..2493d41a8
--- /dev/null
+++ b/ports/gppanel/vcpkg.json
@@ -0,0 +1,10 @@
+{
+ "name": "gppanel",
+ "version-date": "2020-05-20",
+ "port-version": 1,
+ "description": "gpPanel is chart library for wxWidget. It inheritance from wxPanel and use modified wxMathPlot library at chart engine.",
+ "homepage": "https://github.com/woollybah/gppanel",
+ "dependencies": [
+ "wxwidgets"
+ ]
+}
diff --git a/ports/wxchartdir/CONTROL b/ports/wxchartdir/CONTROL
deleted file mode 100644
index 22a741956..000000000
--- a/ports/wxchartdir/CONTROL
+++ /dev/null
@@ -1,5 +0,0 @@
-Source: wxchartdir
-Version: 1.0.0
-Build-Depends: chartdir, wxwidgets
-Homepage: https://github.com/utelle/wxchartdir
-Description: wxChartDir provides components for the integration and use of the commercial C++ library ChartDirector, a universal chart component developed by Advanced Software Engineering Ltd, in wxWidgets based applications.
diff --git a/ports/wxchartdir/portfile.cmake b/ports/wxchartdir/portfile.cmake
index 0e2052ec2..2947d7922 100644
--- a/ports/wxchartdir/portfile.cmake
+++ b/ports/wxchartdir/portfile.cmake
@@ -10,22 +10,9 @@ vcpkg_from_github(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-vcpkg_from_github(
- OUT_SOURCE_PATH VCPKG_WX_FIND_SOURCE_PATH
- REPO CaeruleusAqua/vcpkg-wx-find
- REF 17993e942f677799b488a06ca659a8e46ff272c9
- SHA512 0fe07d3669f115c9b6a761abd7743f87e67f24d1eae3f3abee4715fa4d6b76af0d1ea3a4bd82dbdbed430ae50295e1722615ce0ee7d46182125f5048185ee153
- HEAD_REF master
-)
-
-file(COPY ${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH})
-file(COPY ${CMAKE_ROOT}/Modules/FindPackageMessage.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH})
-
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS
- -DCMAKE_MODULE_PATH=${VCPKG_WX_FIND_SOURCE_PATH}
)
vcpkg_install_cmake()
diff --git a/ports/wxchartdir/vcpkg.json b/ports/wxchartdir/vcpkg.json
new file mode 100644
index 000000000..29f8cb251
--- /dev/null
+++ b/ports/wxchartdir/vcpkg.json
@@ -0,0 +1,11 @@
+{
+ "name": "wxchartdir",
+ "version": "1.0.0",
+ "port-version": 1,
+ "description": "wxChartDir provides components for the integration and use of the commercial C++ library ChartDirector, a universal chart component developed by Advanced Software Engineering Ltd, in wxWidgets based applications.",
+ "homepage": "https://github.com/utelle/wxchartdir",
+ "dependencies": [
+ "chartdir",
+ "wxwidgets"
+ ]
+}
diff --git a/ports/wxwidgets/CONTROL b/ports/wxwidgets/CONTROL
deleted file mode 100644
index 35d3b461e..000000000
--- a/ports/wxwidgets/CONTROL
+++ /dev/null
@@ -1,7 +0,0 @@
-Source: wxwidgets
-Version: 3.1.4
-Port-Version: 3
-Homepage: https://github.com/wxWidgets/wxWidgets
-Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications.
-Build-Depends: zlib, libpng, tiff, expat
-Supports: !uwp
diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake
index 13bbc9c40..8e13516e5 100644
--- a/ports/wxwidgets/portfile.cmake
+++ b/ports/wxwidgets/portfile.cmake
@@ -40,10 +40,6 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-vcpkg_copy_tools(TOOL_NAMES wxrc AUTO_CLEAN)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
-
file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
if(DLLS)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
@@ -61,16 +57,34 @@ if(DLLS)
endforeach()
endif()
+if(VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_copy_tools(TOOL_NAMES wxrc AUTO_CLEAN)
+else()
+ vcpkg_copy_tools(TOOL_NAMES wxrc wx-config wxrc-3.1 AUTO_CLEAN)
+endif()
+
# do the copy pdbs now after the dlls got moved to the expected /bin folder above
vcpkg_copy_pdbs()
-if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h)
- file(RENAME ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h ${CURRENT_PACKAGES_DIR}/include/wx/setup.h)
+if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/mswud)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/mswud ${CURRENT_PACKAGES_DIR}/lib/mswud)
endif()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/mswud)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/msvc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(GLOB_RECURSE INCLUDES ${CURRENT_PACKAGES_DIR}/include/*)
+foreach(INC IN LISTS INCLUDES)
+ file(READ "${INC}" _contents)
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ string(REPLACE "defined(WXUSINGDLL)" "0" _contents "${_contents}")
+ else()
+ string(REPLACE "defined(WXUSINGDLL)" "1" _contents "${_contents}")
+ endif()
+ # Remove install prefix from setup.h to ensure package is relocatable
+ string(REGEX REPLACE "\n#define wxINSTALL_PREFIX [^\n]*" "\n#define wxINSTALL_PREFIX \"\"" _contents "${_contents}")
+ file(WRITE "${INC}" "${_contents}")
+endforeach()
-file(INSTALL ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets)
+configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/wxwidgets/usage COPYONLY)
+file(INSTALL ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/wxwidgets/usage b/ports/wxwidgets/usage
new file mode 100644
index 000000000..e873e4ae3
--- /dev/null
+++ b/ports/wxwidgets/usage
@@ -0,0 +1,5 @@
+The package wxwidgets provides CMake integration:
+
+ find_package(wxWidgets REQUIRED)
+ target_include_directories(main PRIVATE ${wxWidgets_INCLUDE_DIRS})
+ target_link_libraries(main PRIVATE ${wxWidgets_LIBRARIES})
diff --git a/ports/wxwidgets/vcpkg-cmake-wrapper.cmake b/ports/wxwidgets/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..f2eb1bcc2
--- /dev/null
+++ b/ports/wxwidgets/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,19 @@
+set(wxWidgets_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." CACHE INTERNAL "" FORCE)
+set(WX_ROOT_DIR "${wxWidgets_ROOT_DIR}")
+set(wxWidgets_LIB_DIR "${wxWidgets_ROOT_DIR}/lib" CACHE INTERNAL "" FORCE)
+set(WX_LIB_DIR "${wxWidgets_LIB_DIR}")
+find_library(WX_based NAMES wxbase31ud PATHS "${wxWidgets_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH)
+file(GLOB WX_DEBUG_LIBS "${wxWidgets_ROOT_DIR}/debug/lib/wx*d_*.lib")
+foreach(WX_DEBUG_LIB ${WX_DEBUG_LIBS})
+ string(REGEX REPLACE ".*wx([^/]*)d_([^/\\.]*)\\.[^/\\.]*\$" "WX_\\2d" varname "${WX_DEBUG_LIB}")
+ set(${varname} "${WX_DEBUG_LIB}" CACHE INTERNAL "" FORCE)
+endforeach()
+_find_package(${ARGS})
+find_package(ZLIB QUIET)
+find_package(libpng CONFIG QUIET)
+find_package(TIFF QUIET)
+find_package(expat CONFIG QUIET)
+
+if(wxWidgets_LIBRARIES AND NOT wxWidgets_LIBRARIES MATCHES "TIFF::TIFF;png;expat::expat;ZLIB::ZLIB")
+ list(APPEND wxWidgets_LIBRARIES "TIFF::TIFF;png;expat::expat;ZLIB::ZLIB")
+endif()
diff --git a/ports/wxwidgets/vcpkg.json b/ports/wxwidgets/vcpkg.json
new file mode 100644
index 000000000..49b2fab10
--- /dev/null
+++ b/ports/wxwidgets/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "wxwidgets",
+ "version-semver": "3.1.4",
+ "port-version": 5,
+ "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",
+ "dependencies": [
+ "expat",
+ "libpng",
+ "tiff",
+ "zlib"
+ ]
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index a965d35df..6eaf2ae63 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2278,7 +2278,7 @@
},
"gppanel": {
"baseline": "2020-05-20",
- "port-version": 0
+ "port-version": 1
},
"graphene": {
"baseline": "1.10.2",
@@ -6222,11 +6222,11 @@
},
"wxchartdir": {
"baseline": "1.0.0",
- "port-version": 0
+ "port-version": 1
},
"wxwidgets": {
"baseline": "3.1.4",
- "port-version": 3
+ "port-version": 5
},
"x-plane": {
"baseline": "3.0.3",
diff --git a/versions/g-/gppanel.json b/versions/g-/gppanel.json
index a085dafc2..5b4ec4c3b 100644
--- a/versions/g-/gppanel.json
+++ b/versions/g-/gppanel.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "4cc181130888f98e2495b4a1f342b28a532f28b4",
+ "version-date": "2020-05-20",
+ "port-version": 1
+ },
+ {
"git-tree": "9345e63310617dade1d1664276a36f5ca4578546",
"version-string": "2020-05-20",
"port-version": 0
diff --git a/versions/w-/wxchartdir.json b/versions/w-/wxchartdir.json
index b6c2c5cf7..6cd71a59b 100644
--- a/versions/w-/wxchartdir.json
+++ b/versions/w-/wxchartdir.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "a08e6fa005143547643f47527bb263aca530b715",
+ "version": "1.0.0",
+ "port-version": 1
+ },
+ {
"git-tree": "c9d334a5412996c85e1d57bf6067ba1934e7f038",
"version-string": "1.0.0",
"port-version": 0
diff --git a/versions/w-/wxwidgets.json b/versions/w-/wxwidgets.json
index f0d1ac567..2d87681d0 100644
--- a/versions/w-/wxwidgets.json
+++ b/versions/w-/wxwidgets.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "c608ed7a8383b93a30bd7894b8bee51b0c53066d",
+ "version-semver": "3.1.4",
+ "port-version": 5
+ },
+ {
"git-tree": "ae942a1e9b501be783a788278accf92d99d34434",
"version-string": "3.1.4",
"port-version": 3