mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 06:53:58 +08:00
[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:
parent
e6d762b94b
commit
70f380e802
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user