1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

protobuf: Install villas.pb-c.h to include/villas/formats

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2024-08-23 10:08:14 +02:00 committed by Niklas Eiling
parent 36687d6af4
commit 48189b1aaa
2 changed files with 9 additions and 10 deletions

View file

@ -12,7 +12,7 @@
#include <villas/format.hpp>
// Generated message descriptors by protoc
#include <villas.pb-c.h>
#include <villas/format/villas.pb-c.h>
namespace villas {
namespace node {

View file

@ -29,6 +29,14 @@ if(DEFINED PROTOBUFC_COMPILER AND PROTOBUFC_FOUND)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
add_custom_command(
OUTPUT
${CMAKE_BINARY_DIR}/include/villas/formats/villas.pb-c.h
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/villas.pb-c.h
${CMAKE_BINARY_DIR}/include/villas/formats
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/villas.pb-c.h)
list(APPEND FORMAT_SRC
protobuf.cpp
${CMAKE_CURRENT_BINARY_DIR}/villas.pb-c.c
@ -41,15 +49,6 @@ if(DEFINED PROTOBUFC_COMPILER AND PROTOBUFC_FOUND)
list(APPEND LIBRARIES
PkgConfig::PROTOBUFC
)
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/villas
COMPONENT devel
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
)
endif()
list(APPEND FORMAT_SRC