2019-05-22 12:00:24 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
2018-03-09 07:33:11 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-11 10:13:11 +08:00
|
|
|
REPO microsoft/msix-packaging
|
2020-01-10 07:18:40 +08:00
|
|
|
REF ab322965d64baf1448548cbe18139e8872d686f2 # v1.7
|
2020-06-13 04:09:46 +08:00
|
|
|
SHA512 d64767c84d5933bf3d1e0e62e9dc21fa13e02b8cf31776ccbe2e7066e514798d8ff758dc2b6fd64f6eabcf3deb83ef0eaa03e1a7d407307f347a045e8a75d3dd
|
2018-03-09 07:33:11 +08:00
|
|
|
HEAD_REF master
|
2020-01-10 07:18:40 +08:00
|
|
|
PATCHES
|
|
|
|
install-cmake.patch
|
|
|
|
fix-dependency-catch2.patch
|
2018-03-09 07:33:11 +08:00
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/lib")
|
|
|
|
file(MAKE_DIRECTORY "${SOURCE_PATH}/lib")
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/lib/CMakeLists.txt")
|
2018-03-09 07:33:11 +08:00
|
|
|
|
2020-01-10 07:18:40 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2019-05-22 12:00:24 +08:00
|
|
|
set(PLATFORM WIN32)
|
|
|
|
set(CRYPTO_LIB crypt32)
|
2020-01-10 07:18:40 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_LINUX)
|
2019-05-22 12:00:24 +08:00
|
|
|
set(PLATFORM LINUX)
|
|
|
|
set(CRYPTO_LIB openssl)
|
2020-01-10 07:18:40 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_OSX)
|
2019-05-22 12:00:24 +08:00
|
|
|
set(PLATFORM MACOS)
|
|
|
|
set(CRYPTO_LIB openssl)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unknown system: ${VCPKG_CMAKE_SYSTEM_NAME}")
|
|
|
|
endif()
|
2018-03-09 07:33:11 +08:00
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-07-01 00:31:22 +08:00
|
|
|
NO_CHARSET_FLAG
|
2021-03-11 04:04:40 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2018-03-09 07:33:11 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
|
|
|
-DINSTALL_LIBMSIX=ON
|
2019-05-22 12:00:24 +08:00
|
|
|
-DUSE_SHARED_ZLIB=ON
|
|
|
|
-D${PLATFORM}=ON
|
|
|
|
-DXML_PARSER=xerces
|
|
|
|
-DCRYPTO_LIB=${CRYPTO_LIB}
|
2018-03-09 07:33:11 +08:00
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-03-09 07:33:11 +08:00
|
|
|
|
2020-06-13 04:09:46 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-05-22 12:00:24 +08:00
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|