diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index b41101dd793..eb5865def9d 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 4cf2668be9a..a3791d6d02c 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