aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-05-01 02:25:01 +0800
committerGitHub <noreply@github.com>2021-04-30 11:25:01 -0700
commitea8fb318d50993ba9a824c3f4c69755bc59145fb (patch)
treeb924a604b0e29155bb7d09f4513b4dfdbc8436d7 /ports
parent37548049a80d8ad05c4a847cac5cf1c466f865a6 (diff)
downloadvcpkg-ea8fb318d50993ba9a824c3f4c69755bc59145fb.tar.gz
vcpkg-ea8fb318d50993ba9a824c3f4c69755bc59145fb.zip
[libui] Export system libs on OSX (#17095)
* [libui] Export system libs on OSX * update version record * Update ports/libui/portfile.cmake * Update versions/l-/libui.json
Diffstat (limited to 'ports')
-rw-r--r--ports/libui/003-fix-system-link.patch17
-rw-r--r--ports/libui/CONTROL3
-rw-r--r--ports/libui/portfile.cmake7
-rw-r--r--ports/libui/vcpkg.json7
4 files changed, 28 insertions, 6 deletions
diff --git a/ports/libui/003-fix-system-link.patch b/ports/libui/003-fix-system-link.patch
new file mode 100644
index 000000000..42dd23c0d
--- /dev/null
+++ b/ports/libui/003-fix-system-link.patch
@@ -0,0 +1,17 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a23b84d..9892dfc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -172,6 +172,12 @@ if(BUILD_SHARED_LIBS)
+ target_link_libraries(libui
+ PRIVATE ${_LIBUI_LIBS})
+ endif()
++
++if (APPLE)
++ find_library(Foundation Foundation)
++ find_library(AppKit AppKit)
++ target_link_libraries(libui PUBLIC $<$<PLATFORM_ID:Darwin>:${Foundation};${AppKit}>)
++endif()
+ # TODO INTERFACE libs don't inherit to grandhcildren?
+ # on Windows the linker for static libraries is different; don't give it the flags
+ if(BUILD_SHARED_LIBS)
diff --git a/ports/libui/CONTROL b/ports/libui/CONTROL
deleted file mode 100644
index 919f7a12c..000000000
--- a/ports/libui/CONTROL
+++ /dev/null
@@ -1,3 +0,0 @@
-Source: libui
-Version: 2018-11-03-1
-Description: Simple and portable (but not inflexible) native GUI library in C.
diff --git a/ports/libui/portfile.cmake b/ports/libui/portfile.cmake
index 9ac341e01..d975cdfe8 100644
--- a/ports/libui/portfile.cmake
+++ b/ports/libui/portfile.cmake
@@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
"001-fix-cmake.patch"
"002-fix-macosx-build.patch"
+ "003-fix-system-link.patch"
)
vcpkg_configure_cmake(
@@ -16,11 +17,11 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libui TARGET_PATH share/unofficial-libui)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libui/copyright COPYONLY)
-
-vcpkg_copy_pdbs()
+configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
diff --git a/ports/libui/vcpkg.json b/ports/libui/vcpkg.json
new file mode 100644
index 000000000..5d7ff38eb
--- /dev/null
+++ b/ports/libui/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "libui",
+ "version-date": "2018-11-03",
+ "port-version": 2,
+ "description": "Simple and portable (but not inflexible) native GUI library in C.",
+ "homepage": "https://github.com/andlabs/libui"
+}