aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Tassoux <contact@rt2.fr>2020-10-23 09:35:28 +0200
committerGitHub <noreply@github.com>2020-10-23 00:35:28 -0700
commit70f380e802852fc09c929dead9d8b8659d394181 (patch)
tree2b1ac6dce807b3724a3adab53430d337b7ddda57
parente6d762b94b1a1cfa78b5cf5427b3bb5715309c8c (diff)
downloadvcpkg-70f380e802852fc09c929dead9d8b8659d394181.tar.gz
vcpkg-70f380e802852fc09c929dead9d8b8659d394181.zip
[directxtex] Set dx12 feature as dependency for arm and uwp platforms (#14175)
See https://github.com/microsoft/vcpkg/pull/13976#pullrequestreview-515132943
-rw-r--r--ports/directxtex/CONTROL3
-rw-r--r--ports/directxtex/portfile.cmake14
2 files changed, 7 insertions, 10 deletions
diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL
index b41101dd7..eb5865def 100644
--- a/ports/directxtex/CONTROL
+++ b/ports/directxtex/CONTROL
@@ -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
diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake
index 4cf2668be..a3791d6d0 100644
--- a/ports/directxtex/portfile.cmake
+++ b/ports/directxtex/portfile.cmake
@@ -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