-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
32 lines (24 loc) · 896 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
28
29
30
31
32
cmake_minimum_required(VERSION 3.1...3.15)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
project(ExampleWithTinyproto VERSION 0.0
DESCRIPTION "Simply CMake project using Tinyproto"
LANGUAGES CXX C)
set(BASE_DIR ${CMAKE_SOURCE_DIR})
file(
GLOB_RECURSE
SOURCES
src/*.*pp
${BASE_DIR}/lib/tinyproto/tools/serial/serial_linux.c #OpenSerial() etc.
)
add_executable(
${PROJECT_NAME}
${SOURCES}
)
target_include_directories(${PROJECT_NAME} PUBLIC ${BASE_DIR})
#TinyProto requires:
target_include_directories(${PROJECT_NAME} PRIVATE ${BASE_DIR}/lib/tinyproto/src)
target_link_directories( ${PROJECT_NAME} PUBLIC ${BASE_DIR}/lib/tinyproto/bld )
target_link_libraries( ${PROJECT_NAME} PUBLIC libtinyprotocol.a pthread )
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)