vcpkg/ports/msix/portfile.cmake

51 lines
1.4 KiB
CMake
Raw Normal View History

vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
2018-03-09 07:33:11 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/msix-packaging
2020-01-10 07:18:40 +08:00
REF ab322965d64baf1448548cbe18139e8872d686f2 # v1.7
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
)
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)
set(PLATFORM WIN32)
set(CRYPTO_LIB crypt32)
2020-01-10 07:18:40 +08:00
elseif(VCPKG_TARGET_IS_LINUX)
set(PLATFORM LINUX)
set(CRYPTO_LIB openssl)
2020-01-10 07:18:40 +08:00
elseif(VCPKG_TARGET_IS_OSX)
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
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
NO_CHARSET_FLAG
DISABLE_PARALLEL_CONFIGURE
2018-03-09 07:33:11 +08:00
OPTIONS
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
-DINSTALL_LIBMSIX=ON
-DUSE_SHARED_ZLIB=ON
-D${PLATFORM}=ON
-DXML_PARSER=xerces
-DCRYPTO_LIB=${CRYPTO_LIB}
2018-03-09 07:33:11 +08:00
)
vcpkg_cmake_install()
2018-03-09 07:33:11 +08:00
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)