aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-07-17 14:54:00 +0200
committerThomas White <taw@physics.org>2019-07-17 14:54:00 +0200
commitf25b274603861b2eaecbf995493b79530b69d6a9 (patch)
tree7e7a48b77c2c356395b3464323f96503cb008053 /CMakeLists.txt
parent2b2d41cd933bb1015fbf95b63dd8ec3c990b0767 (diff)
parent8b3f748a90421152b364be5170415ee4e0a3b329 (diff)
Merge branch 'tom/zmq'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38b1723b..43a61e4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,20 @@ link_directories (${GLIB_LIBRARY_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+pkg_search_module(MSGPACK msgpack)
+if (MSGPACK_FOUND)
+ message(STATUS "Found Messagepack")
+else ()
+ message(STATUS "MessagePack not found.")
+endif ()
+
+pkg_search_module(ZMQ libzmq)
+if (ZMQ_FOUND)
+ message(STATUS "Found ZMQ")
+else ()
+ message(STATUS "ZMQ not found.")
+endif ()
+
pkg_search_module(GTK gtk+-3.0)
if (NOT GTK_FOUND)
@@ -102,6 +116,8 @@ set(HAVE_GTK ${GTK_FOUND})
set(HAVE_OPENCL ${OpenCL_FOUND})
set(HAVE_GDKPIXBUF ${GDKPIXBUF_FOUND})
set(HAVE_GDK ${GDK_FOUND})
+set(HAVE_MSGPACK ${MSGPACK_FOUND})
+set(HAVE_ZMQ ${ZMQ_FOUND})
set(PACKAGE_VERSION ${PROJECT_VERSION})
@@ -259,11 +275,21 @@ list(APPEND CRYSTFEL_EXECUTABLES list_events)
set(INDEXAMAJIG_SOURCES src/indexamajig.c src/im-sandbox.c src/process_image.c
src/time-accounts.c)
+if ( ZMQ_FOUND AND MSGPACK_FOUND )
+ list(APPEND INDEXAMAJIG_SOURCES src/im-zmq.c)
+endif ()
+
add_executable(indexamajig ${INDEXAMAJIG_SOURCES})
target_include_directories(indexamajig PRIVATE ${COMMON_INCLUDES})
target_link_libraries(indexamajig ${COMMON_LIBRARIES})
list(APPEND CRYSTFEL_EXECUTABLES indexamajig)
+if ( ZMQ_FOUND AND MSGPACK_FOUND )
+ target_include_directories(indexamajig PRIVATE ${ZMQ_INCLUDE_DIR} ${MSGPACK_INCLUDE_DIR})
+ target_link_libraries(indexamajig ${ZMQ_LIBRARIES} ${MSGPACK_LIBRARIES})
+endif ()
+
+
# ----------------------------------------------------------------------
# get_hkl