1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-23 04:50:06 +00:00

Minor updates to CMake for a proof-of-concept project (#316)

This commit is contained in:
Chuck Walbourn 2023-02-06 15:27:58 -08:00 committed by GitHub
parent 23ac46e962
commit 22457feb8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,11 @@ elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$")
set(DIRECTX_ARCH arm64)
endif()
if(VCPKG_TARGET_IS_XBOX)
set(BUILD_DX11 OFF)
set(BUILD_DX12 ON)
endif()
include(GNUInstallDirs)
#--- Library
@ -167,11 +172,14 @@ if(NOT MINGW)
endif()
if(MINGW OR (NOT WIN32) OR VCPKG_TOOLCHAIN)
message(STATUS "Using VCPKG for DirectX-Headers and DirectXMath")
find_package(directx-headers CONFIG REQUIRED)
find_package(directxmath CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE Microsoft::DirectX-Headers Microsoft::DirectXMath)
target_compile_definitions(${PROJECT_NAME} PRIVATE USING_DIRECTX_HEADERS)
target_link_libraries(${PROJECT_NAME} PUBLIC Microsoft::DirectXMath)
if(NOT VCPKG_TARGET_IS_XBOX)
find_package(directx-headers CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC Microsoft::DirectX-Headers)
target_compile_definitions(${PROJECT_NAME} PRIVATE USING_DIRECTX_HEADERS)
endif()
endif()
#--- Package