Skip to content

Commit

Permalink
[vcpkg baseline][pangolin] Fix regressions (microsoft#28680)
Browse files Browse the repository at this point in the history
* Devendor palsigslot

* Rectify usage doc

* No absolute paths

* Update versions
  • Loading branch information
dg0yt authored Jan 4, 2023
1 parent 2d32d7c commit 8061c47
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
26 changes: 26 additions & 0 deletions ports/pangolin/devendor-palsigslot.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/cmake/PangolinConfig.cmake.in b/cmake/PangolinConfig.cmake.in
index f891e34..6fbfc7d 100644
--- a/cmake/PangolinConfig.cmake.in
+++ b/cmake/PangolinConfig.cmake.in
@@ -12,6 +12,7 @@ SET( Pangolin_LIBRARY "${Pangolin_LIBRARIES}" )

include(CMakeFindDependencyMacro)
find_dependency(Eigen3)
+find_dependency(PalSigslot CONFIG)

if (UNIX)
find_dependency(Threads)
diff --git a/components/pango_core/CMakeLists.txt b/components/pango_core/CMakeLists.txt
index 315913d..1d1a1d0 100644
--- a/components/pango_core/CMakeLists.txt
+++ b/components/pango_core/CMakeLists.txt
@@ -44,6 +44,9 @@ install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/include"
DESTINATION ${CMAKE_INSTALL_PREFIX}
)

+find_package(PalSigslot CONFIG REQUIRED)
+target_link_libraries(${COMPONENT} PUBLIC Pal::Sigslot)
+
find_package(Threads QUIET)
if(Threads_FOUND)
target_link_libraries(${COMPONENT} PUBLIC Threads::Threads)
5 changes: 4 additions & 1 deletion ports/pangolin/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ vcpkg_from_github(
REF v0.8
SHA512 d4ca405097e8c439a4f74495f374bc5d5e4febafcf59ee88d985a8764ed36da1753ca4a3a73476dfb74c7d92df31a99242df6e1b47c648e860eee835a6f4f434
HEAD_REF master
PATCHES
devendor-palsigslot.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand All @@ -31,6 +33,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

file(REMOVE "${SOURCE_PATH}/CMakeModules/FindGLEW.cmake")
file(REMOVE "${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake")
file(REMOVE_RECURSE "${SOURCE_PATH}/components/pango_core/include/sigslot")

string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT)

Expand All @@ -56,7 +59,7 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Pangolin)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinConfig.cmake" "SET( Pangolin_CMAKEMODULES ${SOURCE_PATH}/src/../CMakeModules )" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinConfig.cmake" "Pangolin_CMAKEMODULES ${SOURCE_PATH}/" "Pangolin_CMAKEMODULES \${CMAKE_CURRENT_LIST_DIR}/")

vcpkg_copy_pdbs()

Expand Down
5 changes: 2 additions & 3 deletions ports/pangolin/usage
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
The package pangolin is compatible with built-in CMake targets:
pangolin provides CMake targets:

find_package(Pangolin CONFIG REQUIRED)
target_link_libraries(main PRIVATE pangolin)
target_include_directories(main PRIVATE ${Pangolin_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${Pangolin_LIBRARIES})
2 changes: 2 additions & 0 deletions ports/pangolin/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "pangolin",
"version": "0.8",
"port-version": 1,
"description": "Lightweight GUI Library",
"homepage": "https://github.com/stevenlovegrove/Pangolin",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
"eigen3",
"glew",
"palsigslot",
{
"name": "vcpkg-cmake",
"host": true
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5722,7 +5722,7 @@
},
"pangolin": {
"baseline": "0.8",
"port-version": 0
"port-version": 1
},
"pangomm": {
"baseline": "2.50.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pangolin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b6465120255800b1cb8df8fb0a47eff4970a2b47",
"version": "0.8",
"port-version": 1
},
{
"git-tree": "94c1e44cce955d8e29658ed7f1db982a3a695cc3",
"version": "0.8",
Expand Down

0 comments on commit 8061c47

Please sign in to comment.