diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/dacap-clip | |
Diffstat (limited to 'vcpkg/ports/dacap-clip')
| -rw-r--r-- | vcpkg/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch | 22 | ||||
| -rw-r--r-- | vcpkg/ports/dacap-clip/portfile.cmake | 23 | ||||
| -rw-r--r-- | vcpkg/ports/dacap-clip/vcpkg.json | 19 |
3 files changed, 64 insertions, 0 deletions
diff --git a/vcpkg/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch b/vcpkg/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch new file mode 100644 index 0000000..6ea26d2 --- /dev/null +++ b/vcpkg/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch @@ -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} diff --git a/vcpkg/ports/dacap-clip/portfile.cmake b/vcpkg/ports/dacap-clip/portfile.cmake new file mode 100644 index 0000000..99d7b1d --- /dev/null +++ b/vcpkg/ports/dacap-clip/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dacap/clip + REF v${VERSION} + SHA512 8cbe79d6189449be2a96141f97514e393ab7baccdcf37727f6dd54a3d5dacfe293ede39690d62dd4b7d346876973227dd9e29e14c7e8ca928223e6459005284c + 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") diff --git a/vcpkg/ports/dacap-clip/vcpkg.json b/vcpkg/ports/dacap-clip/vcpkg.json new file mode 100644 index 0000000..9a5f131 --- /dev/null +++ b/vcpkg/ports/dacap-clip/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "dacap-clip", + "version": "1.12", + "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 + } + ] +} |