2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2021-01-13 12:01:37 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "OSX")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/UVAtlas
|
2021-06-22 05:20:45 +08:00
|
|
|
REF jun2021b
|
|
|
|
SHA512 d08bacacba324ddf60b003c5cbd5ad715bdbc1cf352a0dc9de58c40fd8f4bcbb562b8285ff1a443453399167a96e5b1af51d32ffc5e1e8f65391ef124c0706d4
|
2019-05-03 13:57:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-01-13 12:01:37 +08:00
|
|
|
if (VCPKG_HOST_IS_LINUX)
|
|
|
|
message(WARNING "Build ${PORT} requires GCC version 9 or later")
|
|
|
|
endif()
|
|
|
|
|
2021-06-22 05:20:45 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
eigen ENABLE_USE_EIGEN
|
|
|
|
)
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
|
2020-09-28 08:33:19 +08:00
|
|
|
else()
|
2020-12-29 09:28:53 +08:00
|
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=ON)
|
2020-09-28 08:33:19 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
|
|
|
|
2021-06-22 05:20:45 +08:00
|
|
|
if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64) AND (NOT ("eigen" IN_LIST FEATURES)))
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
UVATLASTOOL_EXE
|
2021-06-12 01:02:03 +08:00
|
|
|
URLS "https://github.com/Microsoft/UVAtlas/releases/download/jun2021/uvatlastool.exe"
|
|
|
|
FILENAME "uvatlastool-jun2021.exe"
|
|
|
|
SHA512 af2e57a2d6aa41b53784c78ea8b5e181bb6ea6f66b23bfb3710ae3d7aebf3184c1739d02822a1eab438ebaac5fccb053bfac29b77d5ce81ae1f9c8e0bd396b49
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/")
|
|
|
|
|
|
|
|
file(INSTALL
|
2021-01-16 07:24:06 +08:00
|
|
|
${UVATLASTOOL_EXE}
|
2020-12-29 09:28:53 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/)
|
2021-01-16 07:24:06 +08:00
|
|
|
|
2021-06-12 01:02:03 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/uvatlas/uvatlastool-jun2021.exe ${CURRENT_PACKAGES_DIR}/tools/uvatlas/uvatlastool.exe)
|
2021-04-10 00:54:41 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
endif()
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2020-01-03 05:56:14 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|