mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 12:00:06 +00:00
Fix CMake issues with ARM
This commit is contained in:
parent
df039e9236
commit
ef39abc38d
@ -38,6 +38,10 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
|
||||
|
||||
if (DEFINED VCPKG_TARGET_ARCHITECTURE)
|
||||
set(DIRECTX_ARCH ${VCPKG_TARGET_ARCHITECTURE})
|
||||
endif()
|
||||
|
||||
#--- Library
|
||||
set(LIBRARY_HEADERS
|
||||
DirectXTex/DirectXTex.h
|
||||
@ -241,7 +245,7 @@ if(MSVC)
|
||||
target_compile_options(texdiag PRIVATE /fp:fast)
|
||||
endif()
|
||||
|
||||
if ((${CMAKE_SIZEOF_VOID_P} EQUAL "4") AND (NOT ${CMAKE_VS_PLATFORM_NAME} MATCHES "arm"))
|
||||
if((${CMAKE_SIZEOF_VOID_P} EQUAL 4) AND (NOT ${DIRECTX_ARCH} MATCHES "arm"))
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /arch:SSE2)
|
||||
if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
|
||||
target_compile_options(texassemble PRIVATE /arch:SSE2)
|
||||
@ -299,7 +303,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27)
|
||||
if ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27) AND (NOT (${DIRECTX_ARCH} MATCHES "arm(64)?")))
|
||||
if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
|
||||
target_link_options(texassemble PRIVATE /CETCOMPAT)
|
||||
target_link_options(texconv PRIVATE /CETCOMPAT)
|
||||
|
@ -17,6 +17,7 @@
|
||||
"value": "x64",
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": { "DIRECTX_ARCH": "x64" },
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
@ -25,6 +26,7 @@
|
||||
"value": "x86",
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": { "DIRECTX_ARCH": "x86" },
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
@ -33,6 +35,7 @@
|
||||
"value": "arm",
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": { "DIRECTX_ARCH": "arm" },
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
@ -41,6 +44,7 @@
|
||||
"value": "arm64",
|
||||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": { "DIRECTX_ARCH": "arm64" },
|
||||
"hidden": true
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user