set(UVATLAS_TAG dec2022) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/UVAtlas REF dec2022b SHA512 305985bee492a5fec85dd46e6e59200f88c963bc4e5e4f9f8319dd3a16f677de9d802db0407b85703e3e5274570bb41ac418c639a595640f6049fad595ba8046 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 55c8458964ab7682718decf51e69ab3e2d2e3d56744af3dd4fc678acabbdc90ed663075e5d17e74af1f6a58bf439d314720b7ec1242d85d0e7991237d19265e1 ) 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)