-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (35 loc) · 1.26 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
cmake_minimum_required(VERSION 3.10)
include(GNUInstallDirs)
project(vivid-sm
VERSION 0.1.0)
option(VIVID_LOCKFREE "Enable use of atomic operations" OFF)
option(VIVID_LOG "Enable logging" ON)
option(VIVID_UML "Enable UML generation" ON)
option(VIVID_PARAM "Enable parametrized events" ON)
option(VIVID_PARAM_DYNAMIC "Enable dynamically allocated parameters" OFF)
option(VIVID_EXAMPLES "Enable examples" OFF)
option(VIVID_BINDING_LIBEV "Enable binding for libev" OFF)
option(VIVID_BINDING_WIN32 "Enable binding for Windows" OFF)
option(VIVID_BINDING_LINUX "Enable binding for Linux" OFF)
option(VIVID_BINDING_FREERTOS "Enable binding for FreeRTOS" OFF)
configure_file(vivid-sm.pc.in vivid-sm.pc @ONLY)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_compile_options(
-DVIVID_LOCKFREE=$<BOOL:${VIVID_LOCKFREE}>
-DVIVID_LOG=$<BOOL:${VIVID_LOG}>
-DVIVID_UML=$<BOOL:${VIVID_UML}>
-DVIVID_PARAM=$<BOOL:${VIVID_PARAM}>
-DVIVID_PARAM_DYNAMIC=$<BOOL:${VIVID_PARAM_DYNAMIC}>
)
include_directories(
inc
)
if(VIVID_EXAMPLES)
if(VIVID_BINDING_FREERTOS)
include(examples/platform/freertos/freertos-example.cmake)
endif()
add_subdirectory(examples)
endif()
add_subdirectory(src)