[dacap-clip] New port (#46826)

This commit is contained in:
PolarGoose 2025-08-13 00:04:34 +02:00 committed by GitHub
parent 16f68126af
commit 70b96c6aeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 79f7074..775b565 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ if(UNIX AND NOT APPLE)
option(CLIP_X11_WITH_PNG "Compile with libpng to support copy/paste image in png format" on)
endif()
-add_library(clip clip.cpp)
+add_library(clip STATIC clip.cpp)
if(CLIP_ENABLE_IMAGE)
target_sources(clip PRIVATE image.cpp)
@@ -109,6 +109,8 @@ endif()
if(CLIP_INSTALL)
include(GNUInstallDirs)
+ target_include_directories(clip PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+
install(
FILES clip.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}

View File

@ -0,0 +1,23 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dacap/clip
REF v1.10
SHA512 a29531ef276650807233b635ecceaf408147e4e263268eaf8237d74c9a7641d28cda5c6d1eaad4dbe634e720a5969dd6cc82aaeffbc36e0c9598ded31e419ea6
PATCHES
"fix-install-header-and-force-static-compilation.patch")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCLIP_ENABLE_LIST_FORMATS=ON
-DCLIP_EXAMPLES=OFF
-DCLIP_TESTS=OFF
-DCLIP_X11_WITH_PNG=ON
MAYBE_UNUSED_VARIABLES
CLIP_X11_WITH_PNG # only an option when UNIX AND NOT APPLE
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup(PACKAGE_NAME clip CONFIG_PATH "lib/cmake/clip")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

View File

@ -0,0 +1,19 @@
{
"name": "dacap-clip",
"version": "1.10.0",
"description": "Cross-platform C++ library to copy/paste clipboard content.",
"homepage": "https://github.com/dacap/clip",
"license": "MIT",
"supports": "!android & !uwp",
"dependencies": [
"libpng",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -2288,6 +2288,10 @@
"baseline": "may2021",
"port-version": 1
},
"dacap-clip": {
"baseline": "1.10.0",
"port-version": 0
},
"darknet": {
"baseline": "2024-10-10",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "6f7bfb92450f247a05aabd780ab123e48a19cc99",
"version": "1.10.0",
"port-version": 0
}
]
}