summaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/CMakeLists.txt')
-rw-r--r--src/lib/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 7ce98bf2..e05dce8b 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -3,6 +3,12 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_BINARY_DIR}/include)
+find_package(ProtobufC REQUIRED)
+
+include_directories(${PROTOBUF_INCLUDE_DIRS})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+protobuf_generate_c(PROTO_SRCS PROTO_HDRS irmd_messages.proto)
find_library(LIBRT_LIBRARIES rt)
if(NOT LIBRT_LIBRARIES)
@@ -30,8 +36,8 @@ set(SOURCE_FILES
utils.c
)
-add_library(ouroboros SHARED ${SOURCE_FILES})
-target_link_libraries(ouroboros rt pthread)
+add_library(ouroboros SHARED ${SOURCE_FILES} ${PROTO_SRCS} ${PROTO_HDRS})
+target_link_libraries(ouroboros rt pthread ${PROTOBUF_LIBRARIES})
include(MacroAddCompileFlags)
if (CMAKE_BUILD_TYPE MATCHES Debug)