-
Notifications
You must be signed in to change notification settings - Fork 36
/
CMakeLists.txt
27 lines (20 loc) · 767 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
# Extract version info the generator pyproject.toml
file(READ "generator/pyproject.toml" ver)
string(REGEX MATCH "version = \"([0-9]+)\.([0-9]+)\.([0-9]+)\"" _ ${ver})
set(ver_major ${CMAKE_MATCH_1})
set(ver_minor ${CMAKE_MATCH_2})
set(ver_patch ${CMAKE_MATCH_3})
project(ufsm-compose VERSION "${ver_major}.${ver_minor}.${ver_patch}"
DESCRIPTION "uFSM Compose"
HOMEPAGE_URL https://github.com/jonasblixt/ufsm
)
enable_language(C)
enable_testing()
set(CMAKE_C_STANDARD 99)
add_definitions(-DUFSM_VERSION="${ver_major}.${ver_minor}.${ver_patch}")
option(UFSM_BUILD_TESTS "Build test cases" OFF)
add_subdirectory("compose")
if (UFSM_BUILD_TESTS)
add_subdirectory("tests")
endif()