-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
40 lines (30 loc) · 1.25 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
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.3)
project(SimITL)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(GEN_COVERAGE "Generate coverage profile" OFF)
# Linker options for betaflight and windows
if (NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -T${CMAKE_SOURCE_DIR}/extern/betaflight/src/main/target/SITL/pg.ld")
endif()
if (WIN32)
message("-- Win32 --")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -g -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -O2")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif ()
if (GEN_COVERAGE)
message("Building with coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
endif ()
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
# simitl lib
# used by the SimITL executable which contains the betaflight sitl target and extensions
add_subdirectory(extern/)
# SimITL executable
add_subdirectory(src/)
# SimITL shared memory lib for game clients to interface with a running SimITL process
add_subdirectory(lib/)
# SimITL-Tester
# enables testing of a SimITL process without a gameclient
add_subdirectory(tools/simitl-tester)