-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 1.16 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
project (obs-probe-libobs-version)
#SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
#SET(BUILD_SHARED_LIBRARIES OFF)
#SET(CMAKE_EXE_LINKER_FLAGS "-static")
#SET(MSVC_RUNTIME "static")
SET("CMAKE_C_FLAGS_DEBUG" "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
SET("CMAKE_C_FLAGS_MINSIZEREL" "/MT /O1 /Ob1 /D NDEBUG")
SET("CMAKE_C_FLAGS_RELEASE" "/MT /O2 /Ob2 /D NDEBUG")
SET("CMAKE_C_FLAGS_RELWITHDEBINFO" "/MT /Zi /O2 /Ob1 /D NDEBUG")
SET("CMAKE_CXX_FLAGS_DEBUG" "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
SET("CMAKE_CXX_FLAGS_MINSIZEREL" "/MT /O1 /Ob1 /D NDEBUG")
SET("CMAKE_CXX_FLAGS_RELEASE" "/MT /O2 /Ob2 /D NDEBUG")
SET("CMAKE_CXX_FLAGS_RELWITHDEBINFO" "/MT /Zi /O2 /Ob1 /D NDEBUG")
if(MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /EHc-")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc-")
endif()
add_executable(obs-probe-libobs-version WIN32 main.cpp)
set_target_properties(obs-probe-libobs-version PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE")
set_target_properties(obs-probe-libobs-version PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:CONSOLE")
target_link_libraries(obs-probe-libobs-version obs)
add_subdirectory(obs)