-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (26 loc) · 870 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
33
cmake_minimum_required(VERSION 3.5)
project(transbot_sdk)
set(CMAKE_CXX_STANDARD 14)
if (DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(glog REQUIRED)
else ()
find_package(PkgConfig REQUIRED)
pkg_check_modules(glog REQUIRED libglog)
endif ()
add_library(transbot_sdk
SHARED
src/transbot_sdk.cpp
src/hardware/serial_device.cpp
src/protocol/protocol.cpp
src/protocol/package.cpp
src/protocol/memory_pool.cpp)
add_executable(example example/src/main.cpp)
target_include_directories(transbot_sdk PUBLIC include)
target_include_directories(transbot_sdk PRIVATE src ${glog_INCLUDE_DIRECTORY})
target_link_libraries(transbot_sdk PRIVATE ${glog_LIBRARIES})
target_link_libraries(example PRIVATE ${glog_LIBRARIES})
target_link_libraries(example PUBLIC transbot_sdk)
install(TARGETS
transbot_sdk
DESTINATION lib
)