-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
48 lines (38 loc) · 1.05 KB
/
CMakeLists.txt
File metadata and controls
48 lines (38 loc) · 1.05 KB
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
41
42
43
44
45
46
47
project(cs_sim)
cmake_minimum_required(VERSION 2.8)
set(SOURCE_DIR .)
set(SRC_LIST
${SOURCE_DIR}/simulator_p.cpp
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g2")
include_directories(SYSTEM /usr/local/include /usr/include)
# Static lib target
add_library(rcsim_static STATIC
${SRC_LIST}
)
set_target_properties(rcsim_static PROPERTIES
OUTPUT_NAME "rcsim"
CLEAN_DIRECT_OUTPUT 1
VERSION 0.1
)
# Shared lib target
add_library(rcsim_shared SHARED
${SRC_LIST}
)
set_target_properties(rcsim_shared PROPERTIES
OUTPUT_NAME "rcsim"
CLEAN_DIRECT_OUTPUT 1
VERSION 0.1
)
# EXAMPLE 01
add_executable(rcsim-example01 rcsim-example01.cpp)
target_link_libraries(rcsim-example01 rcsim_static)
# EXAMPLE 02
add_executable(rcsim-example02 rcsim-example02.cpp)
target_link_libraries(rcsim-example02 rcsim_static)
# EXAMPLE 03
add_executable(rcsim-example03 rcsim-example03.cpp)
target_link_libraries(rcsim-example03 rcsim_static)
# EXAMPLE 04
add_executable(rcsim-example04 rcsim-example04.cpp)
target_link_libraries(rcsim-example04 rcsim_static)