-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (39 loc) · 1.32 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
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.11)
project(gst)
# c++17 is required
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# public header files
set(SRC_PUBLIC_HEADERS
src/event/events.h
src/event/listener.h
src/event/manager.h
src/event/parameter.h
src/event/qevent.h
src/fsm/fevent.h
src/fsm/fsm.h
src/fsm/machine.h
src/fsm/parameter.h
src/fsm/transition.h
src/event2/event2.h)
# source files and private header files
set(SRC_FILES
${SRC_PUBLIC_HEADERS}
src/fsm/fevent.cpp
src/fsm/mashine.cpp
src/fsm/parameter.cpp)
# the library
add_library(gst SHARED ${SRC_FILES})
add_library(gstStatic STATIC ${SRC_FILES})
target_include_directories(gst PUBLIC src)
target_include_directories(gstStatic PUBLIC src)
# examples
add_executable(event_example examples/event/main.cpp examples/event/TestClass.h examples/event/TestClass.cpp)
target_link_libraries(event_example gstStatic)
target_include_directories(event_example PUBLIC src)
add_executable(fsm_example examples/fsm/main.cpp examples/fsm/test_fsm.h examples/fsm/test_fsm.cpp)
target_link_libraries(fsm_example gstStatic)
target_include_directories(fsm_example PUBLIC src)
add_executable(event2_example examples/evemt2/main.cpp)
target_link_libraries(event2_example gstStatic)
target_include_directories(event2_example PUBLIC src)