2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
|
|
|
|
|
2020-09-28 08:33:19 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/UVAtlas
|
2020-09-28 08:33:19 +08:00
|
|
|
REF 60e2f2d5175f3a9fa6987516c4b44a4f0de3e1fa # aug2020
|
|
|
|
SHA512 6ff99148d8d26345d3e935840d43536558a8174346492d794a4583f50b89a0648bfba3c5a9a433d803fcfd6092716b2f482ff5d1bad896fc4933971dc8107d6d
|
2019-05-03 13:57:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2020-09-28 08:33:19 +08:00
|
|
|
if(VCPKG_PLATFORM_TOOLSET MATCHES "v142")
|
|
|
|
set(SOLUTION_TYPE 2019)
|
|
|
|
set(OCILIB_ARCH_X86 x86)
|
|
|
|
set(OCILIB_ARCH_X64 x64)
|
|
|
|
else()
|
|
|
|
set(SOLUTION_TYPE 2017)
|
|
|
|
set(OCILIB_ARCH_X86 x86)
|
|
|
|
set(OCILIB_ARCH_X64 x64)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
|
|
set(PLATFORM ${OCILIB_ARCH_X86})
|
2019-05-03 13:57:43 +08:00
|
|
|
SET(BUILD_ARCH "Win32")
|
2020-09-28 08:33:19 +08:00
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
|
|
set(PLATFORM ${OCILIB_ARCH_X64})
|
|
|
|
SET(BUILD_ARCH ${OCILIB_ARCH_X64})
|
|
|
|
else()
|
|
|
|
set(PLATFORM ${TRIPLET_SYSTEM_ARCH})
|
|
|
|
endif()
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
vcpkg_build_msbuild(
|
2020-09-28 08:33:19 +08:00
|
|
|
PROJECT_PATH ${SOURCE_PATH}/UVAtlas_Windows10_${SOLUTION_TYPE}.sln
|
|
|
|
PLATFORM ${PLATFORM}
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(INSTALL
|
2020-09-28 08:33:19 +08:00
|
|
|
${SOURCE_PATH}/UVAtlas/inc/
|
2019-05-03 13:57:43 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(INSTALL
|
2020-09-28 08:33:19 +08:00
|
|
|
${SOURCE_PATH}/UVAtlas/Bin/Windows10_${SOLUTION_TYPE}/${BUILD_ARCH}/Release/UVAtlas.lib
|
2019-05-03 13:57:43 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(INSTALL
|
2020-09-28 08:33:19 +08:00
|
|
|
${SOURCE_PATH}/UVAtlas/Bin/Windows10_${SOLUTION_TYPE}/${BUILD_ARCH}/Debug/UVAtlas.lib
|
2019-05-03 13:57:43 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(uvatlastool
|
|
|
|
URLS "https://github.com/Microsoft/UVAtlas/releases/download/sept2016/uvatlastool.exe"
|
|
|
|
FILENAME "uvatlastool.exe"
|
|
|
|
SHA512 2583ba8179d0a58fb85d871368b17571e36242436b5a5dbaf6f99ec2f2ee09f4e11e8f922b29563da3cb3b5bacdb771036c84d5b94f405c7988bfe5f2881c3df
|
|
|
|
)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/")
|
|
|
|
|
|
|
|
file(INSTALL
|
|
|
|
${DOWNLOADS}/uvatlastool.exe
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/)
|
|
|
|
|
|
|
|
# Handle copyright
|
2020-01-03 05:56:14 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|