vcpkg/ports/qtkeychain-qt6/portfile.cmake
مهدي شينون (Mehdi Chinoune) e5fb790328
[qtkeychain] update to 0.14.1 (#33730)
2023-09-13 15:53:40 -07:00

49 lines
1.7 KiB
CMake

message(WARNING "qtkeychain is a third-party extension to Qt and is not affiliated with The Qt Company")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO frankosterfeld/qtkeychain
REF "${VERSION}"
SHA512 bf84b19090e667a2946297e63d9813574193d80e4eecbde2fdfca317a66da3f029b3abef326f4ffb32de032a48004f9cf1bc818468af612723d762652dc25eb6
HEAD_REF master
)
if(VCPKG_CROSSCOMPILING)
list(APPEND QTKEYCHAIN_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR})
list(APPEND QTKEYCHAIN_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share)
# remove when https://github.com/microsoft/vcpkg/pull/16111 is merged
if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS)
list(APPEND QTKEYCHAIN_OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows)
endif()
endif()
list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TEST_APPLICATION:BOOL=OFF)
# FIXME: Why does build translations fail on arm64-windows?
if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=OFF)
else()
list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=ON)
endif()
vcpkg_cmake_configure(
DISABLE_PARALLEL_CONFIGURE
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_WITH_QT6=ON
${QTKEYCHAIN_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Qt6Keychain PACKAGE_NAME Qt6Keychain)
# Remove unneeded dirs
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)