mirror of
https://github.com/hyblocker/OpenVR-SpaceCalibrator.git
synced 2026-10-06 08:00:18 +02:00
fix: msvc fixes
This commit is contained in:
3 files changed
+15
-3
No files matched your search
@@ -17,6 +17,11 @@ function(adjust_bin_paths lib)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
# windows prefers win8.1 sdk instead of win 10 sdk for some god forsaken reason
|
||||
if(WIN32)
|
||||
set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "Forcing Win10 SDK" FORCE)
|
||||
endif()
|
||||
|
||||
project("SpaceCalibrator")
|
||||
|
||||
# 3rd party stuff
|
||||
@@ -57,5 +62,12 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_COMPILER_ID}" S
|
||||
/GF) # eliminate duplicate strings
|
||||
endif()
|
||||
|
||||
# Match SteamVR build flags on MSVC
|
||||
if(MSVC)
|
||||
add_compile_options(/guard:cf /GS)
|
||||
add_link_options("/GUARD:CF")
|
||||
add_compile_options($<$<CONFIG:Release>:/Ot> $<$<CONFIG:Release>:/Oi> $<$<CONFIG:Release>:/Gy>)
|
||||
endif()
|
||||
|
||||
# Include project
|
||||
add_subdirectory ("src")
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
@ECHO OFF
|
||||
cmake -G "Visual Studio 17 2022" -T ClangCL -A x64 -B bin -S .
|
||||
cmake -G "Visual Studio 17 2022" -A x64 -B bin -S .
|
||||
@@ -76,7 +76,7 @@ target_compile_definitions(SpaceCalibratorCommon
|
||||
$<$<NOT:$<CONFIG:Debug>>:QUILL_COMPILE_ACTIVE_LOG_LEVEL=QUILL_COMPILE_ACTIVE_LOG_LEVEL_INFO>
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(SpaceCalibratorCommon
|
||||
PRIVATE -fno-exceptions)
|
||||
endif()
|
||||
@@ -96,7 +96,7 @@ target_compile_definitions(SpaceCalibratorCommon
|
||||
if (MSVC)
|
||||
target_compile_options(SpaceCalibratorCommon
|
||||
PRIVATE
|
||||
/EHs-
|
||||
/EHsc
|
||||
$<$<CONFIG:RELEASE>:/Ob2 /Zc:inline>
|
||||
$<$<CONFIG:RELWITHDEBINFO>:/Ob2 /Zc:inline>
|
||||
$<$<CONFIG:MINSIZEREL>:/Ob2 /Zc:inline>
|
||||
|
||||
Reference in new issue
Block a user