CMake updated to use vcpkg for arm64 version of dxmath

This commit is contained in:
Chuck Walbourn
2021-02-03 23:21:08 -08:00
parent 2a1a884507
commit 0fdfee8ad6
2 changed files with 23 additions and 2 deletions

View File

@@ -139,7 +139,8 @@ if(MSVC)
string(REPLACE "/GR " "/GR- " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
endif()
if (NOT WIN32)
if ((NOT WIN32) OR VCPKG_TOOLCHAIN)
message("INFO: 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)
@@ -206,6 +207,12 @@ if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
target_compile_options(texconv PRIVATE -DUSE_OPENEXR)
target_compile_options(texdiag PRIVATE -DUSE_OPENEXR)
endif()
if (VCPKG_TOOLCHAIN)
target_link_libraries(texassemble Microsoft::DirectX-Headers Microsoft::DirectXMath)
target_link_libraries(texconv Microsoft::DirectX-Headers Microsoft::DirectXMath)
target_link_libraries(texdiag Microsoft::DirectX-Headers Microsoft::DirectXMath)
endif()
endif()
if(MSVC)