diff --git a/ports/clipboardxx/portfile.cmake b/ports/clipboardxx/portfile.cmake new file mode 100644 index 0000000000..fa06e40cf4 --- /dev/null +++ b/ports/clipboardxx/portfile.cmake @@ -0,0 +1,24 @@ +# Download the code from GitHub +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Arian8j2/ClipboardXX + REF d404c39ba384f8e16555610b3633cd7b58d84c59 + SHA512 503bc78cd9fd6096fa92524973d19cbc9169fca91450837a2af7f1518eb928dce10c01e446de1ab76ae0dc366b26831df403f021118fe5c3c2eaeb4d752f638f + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +configure_file( + "${CMAKE_CURRENT_LIST_DIR}/unofficial-clipboardxx-config.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/unofficial-clipboardxx/unofficial-clipboardxx-config.cmake" + @ONLY +) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/clipboardxx/unofficial-clipboardxx-config.cmake.in b/ports/clipboardxx/unofficial-clipboardxx-config.cmake.in new file mode 100644 index 0000000000..80e258e85d --- /dev/null +++ b/ports/clipboardxx/unofficial-clipboardxx-config.cmake.in @@ -0,0 +1,19 @@ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +add_library(unofficial::ClipboardXX INTERFACE IMPORTED) +set_target_properties(unofficial::ClipboardXX PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/include" +) + +if("@VCPKG_TARGET_IS_LINUX@") + set_target_properties(unofficial::ClipboardXX PROPERTIES + INTERFACE_LINK_LIBRARIES "xcb;pthread" + ) +endif() + +unset(_IMPORT_PREFIX) diff --git a/ports/clipboardxx/vcpkg.json b/ports/clipboardxx/vcpkg.json new file mode 100644 index 0000000000..d274c9070a --- /dev/null +++ b/ports/clipboardxx/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "clipboardxx", + "version-date": "2022-02-04", + "description": "Header only, lightweight and cross platform C++ library for copy and paste text from clipboard.", + "homepage": "https://github.com/Arian8j2/ClipboardXX", + "license": "MIT", + "supports": "!osx", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 8d3a9a8efd..71fe5e64cc 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1420,6 +1420,10 @@ "baseline": "1.5.0", "port-version": 0 }, + "clipboardxx": { + "baseline": "2022-02-04", + "port-version": 0 + }, "clipp": { "baseline": "2019-04-30", "port-version": 1 diff --git a/versions/c-/clipboardxx.json b/versions/c-/clipboardxx.json new file mode 100644 index 0000000000..56ebcd2ea8 --- /dev/null +++ b/versions/c-/clipboardxx.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "081dccf5f7ac08990ef5814f6e2b99d1c2d9a385", + "version-date": "2022-02-04", + "port-version": 0 + } + ] +}