mirror of
https://github.com/microsoft/UVAtlas
synced 2024-11-08 13:20:06 +00:00
More Cmake updates
This commit is contained in:
parent
338b56effa
commit
f9ba938175
@ -41,6 +41,14 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
|
||||
|
||||
if (DEFINED VCPKG_TARGET_ARCHITECTURE)
|
||||
set(DIRECTX_ARCH ${VCPKG_TARGET_ARCHITECTURE})
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$")
|
||||
set(DIRECTX_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$")
|
||||
set(DIRECTX_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
|
||||
set(DIRECTX_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$")
|
||||
set(DIRECTX_ARCH arm64)
|
||||
endif()
|
||||
|
||||
#--- Library
|
||||
@ -198,15 +206,19 @@ if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /fp:fast)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /fp:fast "$<$<NOT:$<CONFIG:DEBUG>>:/guard:cf>")
|
||||
|
||||
if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
|
||||
target_compile_options(uvatlastool PRIVATE /fp:fast)
|
||||
target_compile_options(uvatlastool PRIVATE /fp:fast "$<$<NOT:$<CONFIG:DEBUG>>:/guard:cf>")
|
||||
target_link_options(uvatlastool PRIVATE /DYNAMICBASE /NXCOMPAT)
|
||||
endif()
|
||||
|
||||
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(uvatlastool PRIVATE /arch:SSE2)
|
||||
target_link_options(uvatlastool PRIVATE /SAFESEH)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -221,10 +233,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
endif()
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /permissive- /JMC- /Zc:__cplusplus)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus)
|
||||
|
||||
if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
|
||||
target_compile_options(uvatlastool PRIVATE /permissive- /Zc:__cplusplus)
|
||||
target_compile_options(uvatlastool PRIVATE /sdl /permissive- /Zc:__cplusplus)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CODE_ANALYSIS)
|
||||
|
Loading…
Reference in New Issue
Block a user