mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 16:49:03 +08:00
cdc6c6b9c8
* [uvatlas, spectra] ports updated * Update versions * Minor code review * Update version * Code review feedback * Update baseline
66 lines
1.9 KiB
CMake
66 lines
1.9 KiB
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_fail_port_install(ON_TARGET "OSX")
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Microsoft/UVAtlas
|
|
REF jun2021b
|
|
SHA512 d08bacacba324ddf60b003c5cbd5ad715bdbc1cf352a0dc9de58c40fd8f4bcbb562b8285ff1a443453399167a96e5b1af51d32ffc5e1e8f65391ef124c0706d4
|
|
HEAD_REF master
|
|
)
|
|
|
|
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
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
|
|
else()
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=ON)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
|
|
|
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/jun2021/uvatlastool.exe"
|
|
FILENAME "uvatlastool-jun2021.exe"
|
|
SHA512 af2e57a2d6aa41b53784c78ea8b5e181bb6ea6f66b23bfb3710ae3d7aebf3184c1739d02822a1eab438ebaac5fccb053bfac29b77d5ce81ae1f9c8e0bd396b49
|
|
)
|
|
|
|
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-jun2021.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)
|