summaryrefslogtreecommitdiffhomepage
path: root/opentrack/CMakeLists.txt
blob: 0fd7247581e49d7cc54b6ee24cd475d87cf63fe1 (plain)
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
if(MSVC)
    add_compile_options(-EHsc)
    add_definitions(-D_HAS_EXCEPTIONS=1)
endif()

otr_module(executable EXECUTABLE BIN)

set_target_properties(opentrack-executable PROPERTIES
    SUFFIX "${opentrack-binary-suffix}"
    OUTPUT_NAME "opentrack"
    PREFIX ""
)

set_source_files_properties(resources.rc OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/opentrack.ico")

if(APPLE)
    set_source_files_properties(appnap_mac.mm PROPERTIES COMPILE_FLAGS "-fno-objc-arc")
    target_sources(${self} PRIVATE appnap_mac.mm)
endif()

target_link_libraries(${self} opentrack-user-interface opentrack-version)

if(APPLE)
    target_link_libraries(${self} "-framework Foundation")
endif()