Skip to content

Commit

Permalink
[kdsingleapplication] new port (#42647)
Browse files Browse the repository at this point in the history
drdanz authored Dec 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3a7e5f1 commit 3b57fb2
Showing 5 changed files with 79 additions and 0 deletions.
37 changes: 37 additions & 0 deletions ports/kdsingleapplication/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDAB/KDSingleApplication
REF "v${VERSION}"
SHA512 12540e70014f04b20529d19bc41bf089580c8a82e407511979017020d3f1d96c60112b208d5abe1e6c4e90ed65d3b0ca9dc2f09f20c8b580c3b8a17ae9a84ae0
HEAD_REF master
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KDSingleApplication_STATIC)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DKDSingleApplication_QT6=ON
-DKDSingleApplication_STATIC=${KDSingleApplication_STATIC}
-DKDSingleApplication_TESTS=OFF
-DKDSingleApplication_EXAMPLES=OFF
-DKDSingleApplication_DOCS=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME KDSingleApplication-qt6 CONFIG_PATH lib/cmake/KDSingleApplication-qt6)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
file(
COPY
"${SOURCE_PATH}/LICENSES/BSD-3-Clause.txt"
"${SOURCE_PATH}/LICENSES/MIT.txt"
DESTINATION
"${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSES/"
)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
4 changes: 4 additions & 0 deletions ports/kdsingleapplication/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kdsingleapplication provides CMake targets:

find_package(KDSingleApplication-qt6 CONFIG REQUIRED)
target_link_libraries(main PRIVATE KDAB::kdsingleapplication)
25 changes: 25 additions & 0 deletions ports/kdsingleapplication/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "kdsingleapplication",
"version": "1.1.0",
"description": "KDSingleApplication is a helper class for single-instance policy applications.",
"homepage": "https://github.com/KDAB/KDSingleApplication",
"license": "MIT",
"dependencies": [
{
"name": "qtbase",
"default-features": false,
"features": [
"network",
"widgets"
]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
@@ -3948,6 +3948,10 @@
"baseline": "2.1.0",
"port-version": 1
},
"kdsingleapplication": {
"baseline": "1.1.0",
"port-version": 0
},
"kdsoap": {
"baseline": "2.2.0",
"port-version": 0
9 changes: 9 additions & 0 deletions versions/k-/kdsingleapplication.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "97d5185143331c6d5e9f744d6aa0164436ae4e6d",
"version": "1.1.0",
"port-version": 0
}
]
}

0 comments on commit 3b57fb2

Please sign in to comment.