[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
This commit is contained in:
Jack·Boos·Yu 2021-05-01 02:25:01 +08:00 committed by GitHub
parent 37548049a8
commit ea8fb318d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 8 deletions

View File

@ -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)

View File

@ -1,3 +0,0 @@
Source: libui
Version: 2018-11-03-1
Description: Simple and portable (but not inflexible) native GUI library in C.

View File

@ -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)

7
ports/libui/vcpkg.json Normal file
View File

@ -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"
}

View File

@ -3577,8 +3577,8 @@
"port-version": 0
},
"libui": {
"baseline": "2018-11-03-1",
"port-version": 0
"baseline": "2018-11-03",
"port-version": 2
},
"libunibreak": {
"baseline": "4.3-0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "941bfc035a8cfa6020be3475769732b027249a1d",
"version-date": "2018-11-03",
"port-version": 2
},
{
"git-tree": "c3d3ba8694ca2465c505735531cd10dfc8cf150d",
"version-string": "2018-11-03-1",