This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compLIB/server/CMakeLists.txt
Konstantin Lampalzer 9b567b8c6c Protobuf prototype
2022-03-18 18:11:16 +01:00

32 lines
832 B
CMake

cmake_minimum_required(VERSION 3.17)
set(CMAKE_CXX_STANDARD 17)
set(PROJECT_NAME compLib_server)
project(${PROJECT_NAME})
find_package(Protobuf REQUIRED)
set(PROTO_FILES
protos/CompLib.proto
)
set(SRC_FILES
src/main.cpp
src/Spi.cpp
)
set(HDR_FILES
include/messageBuilder.hpp
include/errorMessages.hpp
include/Spi.hpp
)
include_directories(third_party/asio)
PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HDR ${PROTO_FILES})
add_executable(${PROJECT_NAME} ${SRC_FILES} ${HDR_FILES} ${PROTO_SRC} ${PROTO_HDR} ${PROTO_FILES})
target_include_directories(${PROJECT_NAME}
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC ${PROTOBUF_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT_NAME} ${PROTOBUF_LIBRARIES})