29 lines
657 B
CMake
29 lines
657 B
CMake
project(telemetry VERSION 0.1)
|
|
|
|
#
|
|
# Protobuf https://cmake.org/cmake/help/latest/module/FindProtobuf.html
|
|
# see Dockerfile for installation example
|
|
#
|
|
find_package(Protobuf REQUIRED)
|
|
include_directories(${Protobuf_INCLUDE_DIRS})
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS message.proto)
|
|
|
|
|
|
add_library(${PROJECT_NAME}
|
|
message.cpp
|
|
sink.cpp
|
|
reader.cpp
|
|
${PROTO_SRCS}
|
|
${PROTO_HDRS}
|
|
)
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
PUBLIC
|
|
${PROJECT_SOURCE_DIR}/telemetry/sink.hpp
|
|
${PROJECT_SOURCE_DIR}/telemetry/datapoint.hpp
|
|
)
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
${Protobuf_LIBRARIES}
|
|
) |