CMake code review (#168)

This commit is contained in:
Chuck Walbourn 2024-09-03 11:43:02 -07:00 committed by GitHub
parent 49fbfc22dd
commit 8021f4657e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -53,6 +53,7 @@ if(WINDOWS_STORE OR (DEFINED XBOX_CONSOLE_TARGET))
endif()
include(GNUInstallDirs)
include(build/CompilerAndLinker.cmake)
#--- Library
set(LIBRARY_HEADERS
@ -264,8 +265,6 @@ if(MSVC)
endforeach()
endif()
include(build/CompilerAndLinker.cmake)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE ${COMPILER_DEFINES})
target_compile_options(${t} PRIVATE ${COMPILER_SWITCHES})

View File

@ -32,6 +32,13 @@ elseif(CMAKE_VS_PLATFORM_NAME_DEFAULT MATCHES "^[Aa][Rr][Mm]64EC$")
set(DIRECTX_ARCH arm64ec)
endif()
#--- Determines host architecture
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "[Aa][Rr][Mm]64|aarch64|arm64")
set(DIRECTX_HOST_ARCH arm64)
else()
set(DIRECTX_HOST_ARCH x64)
endif()
#--- Build with Unicode Win32 APIs per "UTF-8 Everywhere"
if(WIN32)
list(APPEND COMPILER_DEFINES _UNICODE UNICODE)