aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-03-28 14:32:31 +0200
committerThomas White <taw@physics.org>2022-06-02 12:15:38 +0200
commit095fb15a3136fc20642d3ff12bfe26a1aec1b797 (patch)
treebb61d42159c876e379f07f37ae3f5b885188fd61
parent6838dc35ffa07db47c48613aafb67441f1b620fa (diff)
Skeleton ASAP::O consumer
-rw-r--r--CMakeLists.txt17
-rw-r--r--config.h.cmake.in1
-rw-r--r--config.h.in1
-rw-r--r--meson.build12
4 files changed, 30 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6002d708..7702e643 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,13 @@ else ()
message(STATUS "ZMQ not found.")
endif ()
+pkg_search_module(ASAPO libasapo-consumer)
+if (ASAPO_FOUND)
+ message(STATUS "Found ASAP::O")
+else ()
+ message(STATUS "ASAP::O not found")
+endif ()
+
# Find out where forkpty() is declared
set(CMAKE_REQUIRED_LIBRARIES "-lutil")
check_symbol_exists(forkpty "pty.h" HAVE_FORKPTY_PTY_H)
@@ -108,6 +115,7 @@ set(HAVE_GDKPIXBUF ${GDKPIXBUF_FOUND})
set(HAVE_GDK ${GDK_FOUND})
set(HAVE_ZMQ ${ZMQ_FOUND})
set(HAVE_HDF5 1)
+set(HAVE_ASAPO ${ASAPO_FOUND})
set(PACKAGE_VERSION ${PROJECT_VERSION})
@@ -247,6 +255,10 @@ if ( ZMQ_FOUND )
list(APPEND INDEXAMAJIG_SOURCES src/im-zmq.c)
endif ()
+if ( ASAPO_FOUND )
+ list(APPEND INDEXAMAJIG_SOURCES src/im-asapo.c)
+endif ()
+
add_executable(indexamajig ${INDEXAMAJIG_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/version.c)
target_include_directories(indexamajig PRIVATE ${COMMON_INCLUDES})
@@ -258,6 +270,11 @@ if ( ZMQ_FOUND )
target_link_libraries(indexamajig ${ZMQ_LDFLAGS})
endif ()
+if ( ASAPO_FOUND )
+ target_include_directories(indexamajig PRIVATE ${ASAPO_INCLUDE_DIR})
+ target_link_libraries(indexamajig ${ASAPO_LDFLAGS})
+endif ()
+
# ----------------------------------------------------------------------
# get_hkl
diff --git a/config.h.cmake.in b/config.h.cmake.in
index 2c781b3c..c056cc4a 100644
--- a/config.h.cmake.in
+++ b/config.h.cmake.in
@@ -10,3 +10,4 @@
#cmakedefine HAVE_ZMQ
#cmakedefine HAVE_SLURM
#cmakedefine HAVE_HDF5
+#cmakedefine HAVE_ASAPO
diff --git a/config.h.in b/config.h.in
index 058e5cea..afa44161 100644
--- a/config.h.in
+++ b/config.h.in
@@ -10,3 +10,4 @@
#mesondefine HAVE_ZMQ
#mesondefine HAVE_SLURM
#mesondefine HAVE_HDF5
+#mesondefine HAVE_ASAPO
diff --git a/meson.build b/meson.build
index be0f6477..964d3f61 100644
--- a/meson.build
+++ b/meson.build
@@ -69,6 +69,11 @@ if zmqdep.found()
conf_data.set10('HAVE_ZMQ', true)
endif
+asapodep = dependency('libasapo-consumer', required: false)
+if asapodep.found()
+ conf_data.set10('HAVE_ASAPO', 1)
+endif
+
if cc.has_function('clock_gettime', prefix: '#include <time.h>')
conf_data.set10('HAVE_CLOCK_GETTIME', true)
endif
@@ -167,8 +172,13 @@ if zmqdep.found()
indexamajig_sources += ['src/im-zmq.c']
endif
+if asapodep.found()
+ indexamajig_sources += ['src/im-asapo.c']
+endif
+
indexamajig = executable('indexamajig', indexamajig_sources,
- dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep],
+ dependencies: [mdep, libcrystfeldep, gsldep,
+ pthreaddep, zmqdep, asapodep],
install: true,
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')