mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-27 22:03:01 +00:00
cmake: Don't add custom target for in-obs builds
This commit is contained in:
parent
d80dd0cd22
commit
03930b6b42
1 changed files with 21 additions and 19 deletions
|
@ -118,26 +118,28 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|||
endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MSVC_EXTRA_FLAGS}")
|
||||
|
||||
# Speed Optimized Configuration
|
||||
set(_SPEED_COMPILER_FLAGS "/O2 /Oi /Ot /Oy /GF /GS- /Qpar /arch:AVX /GR /GL")
|
||||
set(_SPEED_LINKER_FLAGS "/LTCG:incremental /OPT:ICF=4 /INCREMENTAL /OPT:REF")
|
||||
set(CMAKE_CXX_FLAGS_SPEED "${CMAKE_CXX_FLAGS_RELWTIHDEBINFO} ${_SPEED_COMPILER_FLAGS}")
|
||||
set(CMAKE_C_FLAGS_SPEED "${CMAKE_C_FLAGS_RELWTIHDEBINFO} ${_SPEED_COMPILER_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_SPEED "${CMAKE_EXE_LINKER_FLAGS_RELWTIHDEBINFO} ${_SPEED_LINKER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_SPEED "${CMAKE_EXE_LINKER_FLAGS_RELWTIHDEBINFO} ${_SPEED_LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_SPEED "${CMAKE_EXE_LINKER_FLAGS_RELWTIHDEBINFO} ${_SPEED_LINKER_FLAGS}")
|
||||
mark_as_advanced(
|
||||
CMAKE_CXX_FLAGS_SPEED
|
||||
CMAKE_C_FLAGS_SPEED
|
||||
CMAKE_EXE_LINKER_FLAGS_SPEED
|
||||
CMAKE_SHARED_LINKER_FLAGS_SPEED
|
||||
CMAKE_MODULE_LINKER_FLAGS_SPEED
|
||||
)
|
||||
if("${PropertyPrefix}" STREQUAL "")
|
||||
# Speed Optimized Configuration
|
||||
set(_SPEED_COMPILER_FLAGS "/O2 /Oi /Ot /Oy /GF /GS- /Qpar /arch:AVX /GR /GL")
|
||||
set(_SPEED_LINKER_FLAGS "/LTCG:incremental /OPT:ICF=4 /INCREMENTAL /OPT:REF")
|
||||
set(CMAKE_CXX_FLAGS_SPEED "${CMAKE_CXX_FLAGS_RELWTIHDEBINFO} ${_SPEED_COMPILER_FLAGS}")
|
||||
set(CMAKE_C_FLAGS_SPEED "${CMAKE_C_FLAGS_RELWTIHDEBINFO} ${_SPEED_COMPILER_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_SPEED "${CMAKE_EXE_LINKER_FLAGS_RELWTIHDEBINFO} ${_SPEED_LINKER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_SPEED "${CMAKE_EXE_LINKER_FLAGS_RELWTIHDEBINFO} ${_SPEED_LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_SPEED "${CMAKE_EXE_LINKER_FLAGS_RELWTIHDEBINFO} ${_SPEED_LINKER_FLAGS}")
|
||||
mark_as_advanced(
|
||||
CMAKE_CXX_FLAGS_SPEED
|
||||
CMAKE_C_FLAGS_SPEED
|
||||
CMAKE_EXE_LINKER_FLAGS_SPEED
|
||||
CMAKE_SHARED_LINKER_FLAGS_SPEED
|
||||
CMAKE_MODULE_LINKER_FLAGS_SPEED
|
||||
)
|
||||
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
list(APPEND CMAKE_CONFIGURATION_TYPES Speed)
|
||||
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
|
||||
CacheSet(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}")
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
list(APPEND CMAKE_CONFIGURATION_TYPES Speed)
|
||||
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
|
||||
CacheSet(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue