CMake code review (#151)
This commit is contained in:
Родитель
b086542394
Коммит
c37b79b61e
|
@ -41,6 +41,7 @@ if(WINDOWS_STORE OR (DEFINED XBOX_CONSOLE_TARGET))
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
include(build/CompilerAndLinker.cmake)
|
||||||
|
|
||||||
#--- Library
|
#--- Library
|
||||||
set(LIBRARY_HEADERS
|
set(LIBRARY_HEADERS
|
||||||
|
@ -216,8 +217,6 @@ if(MSVC)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(build/CompilerAndLinker.cmake)
|
|
||||||
|
|
||||||
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
|
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
|
||||||
target_compile_definitions(${t} PRIVATE ${COMPILER_DEFINES})
|
target_compile_definitions(${t} PRIVATE ${COMPILER_DEFINES})
|
||||||
target_compile_options(${t} PRIVATE ${COMPILER_SWITCHES})
|
target_compile_options(${t} PRIVATE ${COMPILER_SWITCHES})
|
||||||
|
|
|
@ -32,6 +32,13 @@ elseif(CMAKE_VS_PLATFORM_NAME_DEFAULT MATCHES "^[Aa][Rr][Mm]64EC$")
|
||||||
set(DIRECTX_ARCH arm64ec)
|
set(DIRECTX_ARCH arm64ec)
|
||||||
endif()
|
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"
|
#--- Build with Unicode Win32 APIs per "UTF-8 Everywhere"
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND COMPILER_DEFINES _UNICODE UNICODE)
|
list(APPEND COMPILER_DEFINES _UNICODE UNICODE)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче