-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
executable file
·45 lines (34 loc) · 1.17 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.7...3.18)
if (${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
project(CanAscParser VERSION 1.0
DESCRIPTION "A parser for can .asc for file"
LANGUAGES CXX)
add_library(canasc
STATIC
src/ascparser.cpp
src/ascparser.h
src/message.cpp
src/message.h
src/token.cpp
src/token.h
src/tokenizer.cpp
src/tokenizer.h
src/utils.cpp
src/utils.h)
file(GLOB PUBLIC_HEADERS "src/message.h" "src/utils.h" "src/ascparser.h" )
file(COPY ${PUBLIC_HEADERS} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/include/canasc)
target_include_directories(canasc
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/include
)
set_target_properties(canasc
PROPERTIES
CXX_STANDARD 14)
add_subdirectory(sample)
enable_testing()
add_subdirectory(tests)
install(TARGETS canasc EXPORT canasc DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)