[directxtex] Set dx12 feature as dependency for arm and uwp platforms (#14175)

See https://github.com/microsoft/vcpkg/pull/13976#pullrequestreview-515132943
This commit is contained in:
Rémy Tassoux 2020-10-23 09:35:28 +02:00 committed by GitHub
parent e6d762b94b
commit 70f380e802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 10 deletions

View File

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

View File

@ -30,15 +30,11 @@ endif()
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES openexr ENABLE_OPENEXR_SUPPORT
FEATURES
dx12 BUILD_DX12
openexr ENABLE_OPENEXR_SUPPORT
)
if("dx12" IN_LIST FEATURES OR VCPKG_TARGET_IS_UWP OR TRIPLET_SYSTEM_ARCH STREQUAL "arm64")
list(APPEND FEATURE_OPTIONS -DBUILD_DX12=ON)
else()
list(APPEND FEATURE_OPTIONS -DBUILD_DX12=OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@ -48,7 +44,7 @@ vcpkg_configure_cmake(
-DBUILD_DX11=ON
)
if(NOT VCPKG_TARGET_IS_UWP AND NOT TRIPLET_SYSTEM_ARCH STREQUAL "arm64")
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_build_cmake()
else()
vcpkg_build_cmake(TARGET DirectXTex)
@ -64,7 +60,7 @@ file(GLOB_RECURSE DEBUG_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/
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 TRIPLET_SYSTEM_ARCH STREQUAL "arm64")
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_copy_tools(
TOOL_NAMES texassemble texconv texdiag
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake