ADD: added protbuf libs dependencies in CMakeLists.txt

This commit is contained in:
Henry Winkel
2022-10-22 15:12:29 +02:00
parent fab18d7d55
commit 22d06a02db
2 changed files with 46 additions and 0 deletions

View File

@@ -24,6 +24,13 @@ IF(NOT TARGET cppzmq)
add_subdirectory(libs/cppzmq EXCLUDE_FROM_ALL)
ENDIF()
set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "")
set(protobuf_BUILD_EXAMPLES OFF CACHE INTERNAL "")
add_subdirectory(libs/protobuf EXCLUDE_FROM_ALL)
include(protobuf)
protobuf_generate_cpp(PROTO_PATH tests/protos CPP_PATH tests/protos/src HPP_PATH tests/protos/include)
add_library(whisper-com STATIC
include/WHISPER/whisper.hpp
@@ -37,6 +44,8 @@ target_link_libraries(whisper-com
libzmq
)
add_dependencies(whisper-com protoc)
target_include_directories(whisper-com PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>