vcpkg/ports/msix/portfile.cmake

50 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)
2020-01-10 07:18:40 +08:00
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_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
NO_CHARSET_FLAG
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_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2018-03-09 07:33:11 +08:00
vcpkg_copy_pdbs()
2020-01-10 07:18:40 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)