mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 06:39:00 +08:00
cc4a86714e
* [directxtk, directxtk12, uvatlas] Port updates for February 2023 releases * Update baseline --------- Co-authored-by: walbourn <chuckw_walbourn@yahoo.com>
69 lines
2.0 KiB
CMake
69 lines
2.0 KiB
CMake
set(UVATLAS_TAG feb2023)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Microsoft/UVAtlas
|
|
REF ${UVATLAS_TAG}
|
|
SHA512 cc44334fe2a372afd8bfa9c508fe59e6b68a3513ab92c0e3fe5657b539641faaa50625a3aafd65d3cb2023a167bfb7158f6b9ac7262d120fe97d48eb3a3742f5
|
|
HEAD_REF main
|
|
PATCHES openexr.patch
|
|
)
|
|
|
|
if (VCPKG_HOST_IS_LINUX)
|
|
message(WARNING "Build ${PORT} requires GCC version 9 or later")
|
|
endif()
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
eigen ENABLE_USE_EIGEN
|
|
spectre ENABLE_SPECTRE_MITIGATION
|
|
)
|
|
|
|
set(EXTRA_OPTIONS -DBUILD_TESTING=OFF)
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
list(APPEND EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
|
|
else()
|
|
list(APPEND EXTRA_OPTIONS -DBUILD_TOOLS=ON)
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/uvatlas)
|
|
|
|
if(VCPKG_HOST_IS_WINDOWS AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64) AND (NOT ("eigen" IN_LIST FEATURES)))
|
|
vcpkg_download_distfile(
|
|
UVATLASTOOL_EXE
|
|
URLS "https://github.com/Microsoft/UVAtlas/releases/download/${UVATLAS_TAG}/uvatlastool.exe"
|
|
FILENAME "uvatlastool-${UVATLAS_TAG}.exe"
|
|
SHA512 f34aa4ec7e10bbe24eefe31ddb98841fa097385921d8c3d813e30836749c4b9f4b6e792c371f59c55e446e91845dbd9d333332f6c06cd8cd966cd2bfee89e29e
|
|
)
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/")
|
|
|
|
file(INSTALL
|
|
${UVATLASTOOL_EXE}
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/uvatlas/uvatlastool-${UVATLAS_TAG}.exe ${CURRENT_PACKAGES_DIR}/tools/uvatlas/uvatlastool.exe)
|
|
|
|
elseif(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_TARGET_IS_UWP))
|
|
|
|
vcpkg_copy_tools(
|
|
TOOL_NAMES uvatlastool
|
|
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
|
|
)
|
|
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|