Updated directxtk et al for cmake package support (#15210)

This commit is contained in:
Chuck Walbourn 2020-12-28 17:28:53 -08:00 committed by GitHub
parent d1e64a013e
commit ec58d649c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 226 additions and 210 deletions

View File

@ -0,0 +1,4 @@
Source: directxmath
Version: 3.1.6
Homepage: https://walbourn.github.io/introducing-directxmath/
Description: DirectXMath SIMD C++ math library

View File

@ -0,0 +1,32 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXMath
REF dec2020
SHA512 73c073f6ef5f2dd867c3f934d471258c001fb85a99b897ef25ac26595c31157e00118143f5fdaa3f25512a2a46ebbe464efd1d697a999137bc4cffc9c29fec8c
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_download_distfile(
SAL_HEADER
URLS "https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h"
FILENAME "sal.h"
SHA512 1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0
)
file(INSTALL
${DOWNLOADS}/sal.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include/)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,8 +1,8 @@
Source: directxmesh
Version: nov2020
Version: nov2020b
Homepage: https://walbourn.github.io/directxmesh
Description: DirectXMesh geometry processing library
Build-Depends: directxmesh[core,dx12](arm64|uwp)
Supports: windows
Feature: dx12
Description: Build with DirectX12 support for Windows 10

View File

@ -1,11 +1,14 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXMesh
REF nov2020
SHA512 07bf8acba1f15f1b74d864ac624c7e0bfbdf5927c3e66f94ef78ab447e757daa01351ca8e1c8e8652dbb7008cee13c30247922af2d1712e61bc50bdb55cedf42
REF nov2020b
SHA512 a3520d916324e16004ec0052c6d4c628be2ea62583d0169b663f67ce03ef84c3ba8ea01c239c75dc89a359de6748039dc11e405ba4b0c4f33ee0225e4e248415
HEAD_REF master
FILE_DISAMBIGUATOR 2
)
vcpkg_check_features(
@ -14,30 +17,41 @@ vcpkg_check_features(
dx12 BUILD_DX12
)
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}
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
)
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_build_cmake()
else()
vcpkg_build_cmake(TARGET DirectXMesh)
endif()
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/DirectXMesh/DirectXMesh.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL ${SOURCE_PATH}/DirectXMesh/DirectXMesh.inl DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(GLOB_RECURSE DEBUG_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/CMake/*.lib)
file(GLOB_RECURSE RELEASE_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake/*.lib)
file(INSTALL ${DEBUG_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${RELEASE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
if(NOT VCPKG_TARGET_IS_UWP)
vcpkg_copy_tools(
TOOL_NAMES Meshconvert
TOOL_NAMES meshconvert
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
)
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(meshconvert
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/nov2020/meshconvert.exe"
FILENAME "meshconvert.exe"
SHA512 189552c74dc634f673a0d15851d7bb7c42c860023b1488086a9904323fc45207244c159c8848a211afafe258825f5051ee6fd85080da3f7f4afdf910764ca8ec
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
file(INSTALL
${DOWNLOADS}/meshconvert.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxmesh/)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,8 +1,8 @@
Source: directxtex
Version: nov2020
Version: nov2020b
Homepage: https://walbourn.github.io/directxtex
Description: DirectXTex texture processing library
Build-Depends: directxtex[core,dx12](arm64|uwp)
Supports: windows
Feature: dx12
Description: Build with DirectX12 support for Windows 10

View File

@ -1,81 +1,3 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53b41a3..84867f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,9 @@ option(BC_USE_OPENMP "Build with OpenMP support" ON)
option(ENABLE_CODE_ANALYSIS "Use Static Code Analysis on build" OFF)
+# Includes the functions for loading/saving OpenEXR files at runtime
+option(ENABLE_OPENEXR_SUPPORT "Build with OpenEXR support" OFF)
+
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -67,6 +70,12 @@ endif()
if(BUILD_DX12)
set(LIBRARY_SOURCES ${LIBRARY_SOURCES} DirectXTex/DirectXTexD3D12.cpp)
endif()
+if(ENABLE_OPENEXR_SUPPORT)
+ set(LIBRARY_SOURCES
+ ${LIBRARY_SOURCES}
+ DirectXTex/DirectXTexEXR.h
+ DirectXTex/DirectXTexEXR.cpp)
+endif()
add_library(${PROJECT_NAME} STATIC ${LIBRARY_SOURCES} DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc)
@@ -82,6 +91,10 @@ add_custom_command(
source_group(${PROJECT_NAME} REGULAR_EXPRESSION DirectXTex/*.*)
target_include_directories(${PROJECT_NAME} PUBLIC DirectXTex)
+if(ENABLE_OPENEXR_SUPPORT)
+ find_package(openexr REQUIRED)
+ target_include_directories(${PROJECT_NAME} PRIVATE ${OPENEXR_INCLUDE_DIRS}/OpenEXR)
+endif()
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16")
target_precompile_headers(${PROJECT_NAME} PRIVATE DirectXTex/DirectXTexP.h)
@@ -116,6 +129,13 @@ add_executable(texdiag Texdiag/texdiag.cpp)
target_link_libraries(texdiag ${PROJECT_NAME} version.lib)
source_group(texdiag REGULAR_EXPRESSION Texdiag/*.*)
+if(ENABLE_OPENEXR_SUPPORT)
+ target_link_libraries(${PROJECT_NAME} ${OPENEXR_ILMIMF_LIBRARY})
+ target_link_libraries(texassemble ${OPENEXR_ILMIMF_LIBRARY})
+ target_link_libraries(texconv ${OPENEXR_ILMIMF_LIBRARY})
+ target_link_libraries(texdiag ${OPENEXR_ILMIMF_LIBRARY})
+endif()
+
if(MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /fp:fast)
target_compile_options(texassemble PRIVATE /fp:fast)
@@ -140,6 +160,12 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
target_compile_options(texassemble PRIVATE ${WarningsEXE})
target_compile_options(texconv PRIVATE ${WarningsEXE} "-Wno-global-constructors")
target_compile_options(texdiag PRIVATE ${WarningsEXE} "-Wno-double-promotion")
+
+ if(ENABLE_OPENEXR_SUPPORT)
+ target_compile_options(texassemble PRIVATE -DUSE_OPENEXR)
+ target_compile_options(texconv PRIVATE -DUSE_OPENEXR)
+ target_compile_options(texdiag PRIVATE -DUSE_OPENEXR)
+ endif()
endif()
if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options(${PROJECT_NAME} PRIVATE /permissive- /JMC- /Zc:__cplusplus)
@@ -167,6 +193,12 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options(texconv PRIVATE /openmp /Zc:twoPhase-)
endif()
+ if(ENABLE_OPENEXR_SUPPORT)
+ target_compile_options(texassemble PRIVATE /D "USE_OPENEXR")
+ target_compile_options(texconv PRIVATE /D "USE_OPENEXR")
+ target_compile_options(texdiag PRIVATE /D "USE_OPENEXR")
+ endif()
+
set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4668" "/wd4710" "/wd4820" "/wd5039" "/wd5045" "/wd5219")
target_compile_options(texassemble PRIVATE ${WarningsEXE})
target_compile_options(texconv PRIVATE ${WarningsEXE})
diff --git a/DirectXTex/DirectXTexEXR.cpp b/DirectXTex/DirectXTexEXR.cpp
index 0cfd4db..7a6e70c 100644
--- a/DirectXTex/DirectXTexEXR.cpp

View File

@ -1,11 +1,14 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXTex
REF nov2020
SHA512 a3f4abc2729c6e98b8cd29ff1d410410bced2eaa2dc62563f18344dbb33f30d7ce32c11cafe85f91786e80610d8a2030dab48919f5bf9ccf92ceba2c5ed4db13
REF nov2020b
SHA512 b32f063f838c150f0ce81f4807bb88090d9695ee9857ec198b22a06c758e905008a3e3c3a1370f89ce5ec4d7e3c66f896a915968312776e8e5ada7e53e346475
HEAD_REF master
FILE_DISAMBIGUATOR 2
)
if("openexr" IN_LIST FEATURES)
@ -35,36 +38,59 @@ vcpkg_check_features(
openexr ENABLE_OPENEXR_SUPPORT
)
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}
-DBC_USE_OPENMP=ON
-DBUILD_DX11=ON
)
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_build_cmake()
else()
vcpkg_build_cmake(TARGET DirectXTex)
endif()
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/DirectXTex/DirectXTex.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL ${SOURCE_PATH}/DirectXTex/DirectXTex.inl DESTINATION ${CURRENT_PACKAGES_DIR}/include)
if("openexr" IN_LIST FEATURES)
file(INSTALL ${SOURCE_PATH}/DirectXTex/DirectXTexEXR.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
endif()
file(GLOB_RECURSE DEBUG_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/CMake/*.lib)
file(GLOB_RECURSE RELEASE_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake/*.lib)
file(INSTALL ${DEBUG_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${RELEASE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
if(NOT VCPKG_TARGET_IS_UWP)
vcpkg_copy_tools(
TOOL_NAMES texassemble texconv texdiag
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
)
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(texassemble
URLS "https://github.com/Microsoft/DirectXTex/releases/download/nov2020/texassemble.exe"
FILENAME "texassemble.exe"
SHA512 8094a4ef4a00df3d2cb4a18a1c84664f4a8bf018328751f19feef1691d1a3d9380556039b1a771728e55d94113baa0f69998f63c96a3b4a6f6c3ba9e53a29a64
)
vcpkg_download_distfile(texconv
URLS "https://github.com/Microsoft/DirectXTex/releases/download/nov2020/texconv.exe"
FILENAME "texconv.exe"
SHA512 91555fae9fadb942e8f3bc7052888fe515b1a0efb17f5eb53ef437e06c2e50baaef6a0552c93f218b028133baf65ba6e3393042a47b210baa9692ed6f8bbed2b
)
vcpkg_download_distfile(texdiag
URLS "https://github.com/Microsoft/DirectXTex/releases/download/nov2020/texdiag.exe"
FILENAME "texdiag.exe"
SHA512 7ba66004228ea1830fbfe5c40f4ee6cf1023f8256136a565c28e584a71115dd2d38e5f79f862de39ee54f8b34d7d8848c656082800f2a59f5b4833aee678d4b8
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
file(INSTALL
${DOWNLOADS}/texassemble.exe
${DOWNLOADS}/texconv.exe
${DOWNLOADS}/texdiag.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtex/)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,8 +1,8 @@
Source: directxtk
Version: nov2020
Version: nov2020b
Homepage: https://walbourn.github.io/directxtk
Description: A collection of helper classes for writing DirectX 11.x code in C++.
Build-Depends: directxtk[core,xaudio2-9](arm64|uwp)
Supports: windows
Feature: xaudio2-9
Description: Build with XAudio 2.9 support for Windows 10

View File

@ -1,11 +1,14 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXTK
REF nov2020
SHA512 9d10a851f37deb428c16166cdecf38ffba28a4ab836f9753f071bccc570fcb22ce98271c6bbad9fa1380dddd1fa6602156a7aa1607d347139bda1860fc2210ce
REF nov2020b
SHA512 25c8404a949988bcb468383bffa9510dfcc4fa5498f10319816024448987bbddbecef4a29c44d414d5696b0ec58704fd10071b674fc24ec5844fc5bf0f58097e
HEAD_REF master
FILE_DISAMBIGUATOR 2
)
vcpkg_check_features(
@ -15,34 +18,54 @@ vcpkg_check_features(
xaudio2-8 BUILD_XAUDIO_WIN8
)
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}
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
)
if(NOT VCPKG_TARGET_IS_UWP)
vcpkg_build_cmake()
else()
vcpkg_build_cmake(TARGET DirectXTK)
endif()
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/Inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK)
file(GLOB_RECURSE DEBUG_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/CMake/*.lib)
file(GLOB_RECURSE RELEASE_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake/*.lib)
file(INSTALL ${DEBUG_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${RELEASE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if(NOT VCPKG_TARGET_IS_UWP)
vcpkg_copy_tools(
TOOL_NAMES XWBTool
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH MakeSpriteFont/MakeSpriteFont.csproj
PLATFORM AnyCPU
)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH MakeSpriteFont/MakeSpriteFont.csproj
PLATFORM AnyCPU
)
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(makespritefont
URLS "https://github.com/Microsoft/DirectXTK/releases/download/nov2020/MakeSpriteFont.exe"
FILENAME "makespritefont.exe"
SHA512 d576eecd9763d238e12ba8d865917738a4bc8cbf632943e5c11b9426ecdfeaa9e8522076f1bb7122d41e69158fc7ca0939f2d90f9986470639966b3f849d236a
)
vcpkg_download_distfile(xwbtool
URLS "https://github.com/Microsoft/DirectXTK/releases/download/nov2020/XWBTool.exe"
FILENAME "xwbtool.exe"
SHA512 6ac8fc12fcea0f808aac1367907dbbb0c5669c8c654fc21f38b4e1ce951710ade1851515dba074e9254579b018545c3cdb2b6cf57366dfba0196603510bf51cd
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
file(INSTALL
${DOWNLOADS}/makespritefont.exe
${DOWNLOADS}/xwbtool.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtk/)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,4 +1,6 @@
Source: directxtk12
Version: nov2020
Version: nov2020b
Homepage: https://walbourn.github.io/directx-tool-kit-for-directx-12
Description: A collection of helper classes for writing DirectX 12 code in C++.
Supports: windows

View File

@ -1,10 +1,12 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXTK12
REF nov2020
SHA512 fd49bd8f124ac5c9808f8da09a955599234712b74525fd27739135f9044883b65f4c570048a9fe335f6aa82c8d49de1e6c0e81c904696ade3cd63b1982cf4d68
REF nov2020b
SHA512 3a47209f109f993e4ca779bca9c9417c3f11a0472b3c91f52beb46a388edc5487d4e2cd472371ef6ffc4d3e54782d12e884befe8537fa68190c1556d6e36fbab
HEAD_REF master
)
@ -14,13 +16,30 @@ vcpkg_configure_cmake(
OPTIONS -DBUILD_XAUDIO_WIN10=ON
)
vcpkg_build_cmake()
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
file(INSTALL ${SOURCE_PATH}/Inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK12)
if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(makespritefont
URLS "https://github.com/Microsoft/DirectXTK12/releases/download/nov2020/MakeSpriteFont.exe"
FILENAME "makespritefont.exe"
SHA512 d576eecd9763d238e12ba8d865917738a4bc8cbf632943e5c11b9426ecdfeaa9e8522076f1bb7122d41e69158fc7ca0939f2d90f9986470639966b3f849d236a
)
file(GLOB_RECURSE DEBUG_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/CMake/*.lib)
file(GLOB_RECURSE RELEASE_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake/*.lib)
file(INSTALL ${DEBUG_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${RELEASE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
vcpkg_download_distfile(xwbtool
URLS "https://github.com/Microsoft/DirectXTK12/releases/download/nov2020/XWBTool.exe"
FILENAME "xwbtool.exe"
SHA512 6ac8fc12fcea0f808aac1367907dbbb0c5669c8c654fc21f38b4e1ce951710ade1851515dba074e9254579b018545c3cdb2b6cf57366dfba0196603510bf51cd
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk12/")
file(INSTALL
${DOWNLOADS}/makespritefont.exe
${DOWNLOADS}/xwbtool.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtk12/)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,5 +1,6 @@
Source: uvatlas
Version: aug2020
Version: dec2020b
Homepage: https://github.com/Microsoft/UVAtlas
Description: UVAtlas isochart texture atlas
Build-Depends: directxmesh(!uwp), directxtex(!uwp)
Supports: windows

View File

@ -1,61 +1,51 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/UVAtlas
REF 60e2f2d5175f3a9fa6987516c4b44a4f0de3e1fa # aug2020
SHA512 6ff99148d8d26345d3e935840d43536558a8174346492d794a4583f50b89a0648bfba3c5a9a433d803fcfd6092716b2f482ff5d1bad896fc4933971dc8107d6d
REF dec2020b
SHA512 4a81f5e45d906a897a73af940e63f684e416e7b851c4c439fb2dc7fe761838f7a84ccd5088bc94460cdb5d5fd9f5105c719a81e65a381bbdd2fad3465cdf3d46
HEAD_REF master
FILE_DISAMBIGUATOR 2
)
if(VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(SOLUTION_TYPE 2019)
set(OCILIB_ARCH_X86 x86)
set(OCILIB_ARCH_X64 x64)
if(VCPKG_TARGET_IS_UWP)
set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
else()
set(SOLUTION_TYPE 2017)
set(OCILIB_ARCH_X86 x86)
set(OCILIB_ARCH_X64 x64)
set(EXTRA_OPTIONS -DBUILD_TOOLS=ON)
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(PLATFORM ${OCILIB_ARCH_X86})
SET(BUILD_ARCH "Win32")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(PLATFORM ${OCILIB_ARCH_X64})
SET(BUILD_ARCH ${OCILIB_ARCH_X64})
else()
set(PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/UVAtlas_Windows10_${SOLUTION_TYPE}.sln
PLATFORM ${PLATFORM}
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
)
file(INSTALL
${SOURCE_PATH}/UVAtlas/inc/
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL
${SOURCE_PATH}/UVAtlas/Bin/Windows10_${SOLUTION_TYPE}/${BUILD_ARCH}/Release/UVAtlas.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL
${SOURCE_PATH}/UVAtlas/Bin/Windows10_${SOLUTION_TYPE}/${BUILD_ARCH}/Debug/UVAtlas.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
vcpkg_download_distfile(uvatlastool
URLS "https://github.com/Microsoft/UVAtlas/releases/download/sept2016/uvatlastool.exe"
if(NOT VCPKG_TARGET_IS_UWP)
vcpkg_copy_tools(
TOOL_NAMES uvatlastool
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
)
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(uvatlastool
URLS "https://github.com/Microsoft/UVAtlas/releases/download/dec2020/uvatlastool.exe"
FILENAME "uvatlastool.exe"
SHA512 2583ba8179d0a58fb85d871368b17571e36242436b5a5dbaf6f99ec2f2ee09f4e11e8f922b29563da3cb3b5bacdb771036c84d5b94f405c7988bfe5f2881c3df
)
SHA512 f3388e590bb45281a089d6d38ff603e99f2ff9124ec1e6caebae2663e4ab8ccaf06f5cce671f78ed9a1f882c6d2e2b1188212ef0219f96b46872faa20cc649fd
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/")
file(INSTALL
${DOWNLOADS}/uvatlastool.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/)
file(INSTALL
${DOWNLOADS}/uvatlastool.exe
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -194,18 +194,6 @@ devicenameresolver:x64-windows-static=fail
dimcli:arm-uwp=fail
dimcli:x64-osx=fail
dimcli:x64-uwp=fail
directxmesh:x64-linux=fail
directxmesh:x64-osx=fail
directxmesh:x64-windows-static=fail
directxtex:x64-linux=fail
directxtex:x64-osx=fail
directxtex:x64-windows-static=fail
directxtk:x64-linux=fail
directxtk:x64-osx=fail
directxtk:x64-windows-static=fail
directxtk12:x64-linux=fail
directxtk12:x64-osx=fail
directxtk12:x64-windows-static=fail
discord-game-sdk:x64-windows-static=fail
discord-rpc:arm-uwp=fail
discord-rpc:x64-uwp=fail
@ -1549,11 +1537,6 @@ urdfdom:x64-windows-static=fail
usd:x86-windows=fail
uthenticode:arm-uwp=fail
uthenticode:x64-uwp=fail
uvatlas:arm64-windows=fail
uvatlas:arm-uwp=fail
uvatlas:x64-linux=fail
uvatlas:x64-osx=fail
uvatlas:x64-windows-static=fail
v8:arm64-windows=fail
v8:arm-uwp=fail
v8:x64-osx=fail