aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-01-08 15:44:52 +0100
committerThomas White <taw@physics.org>2019-03-14 11:36:56 +0100
commit94ea1c4468fed5ee4be48e3334fe75541ecaba02 (patch)
tree37dcb31bb339e4f4b63780253740d10ab5ad4526 /CMakeLists.txt
parente9391fe842fee1966f195442ba9be7ada9199585 (diff)
ZMQ connection and setup stuff
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 25 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30b34d36..3c01b267 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)
@@ -257,13 +271,23 @@ list(APPEND CRYSTFEL_EXECUTABLES list_events)
# indexamajig
set(INDEXAMAJIG_SOURCES src/indexamajig.c src/im-sandbox.c src/process_image.c
- src/time-accounts.c src/zmq.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