aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-10 15:36:36 +0200
committerThomas White <taw@physics.org>2020-09-10 15:36:36 +0200
commit64b61c7c4da1bb5f38becb857c712a3233b2c9c4 (patch)
treebd681d960d4665ea0c202ee258c56b9b209b79bd /libcrystfel/CMakeLists.txt
parent15fb78fad837096798742da619594be00269d004 (diff)
CMake: Don't compile image-msgpack.c if library is not found
Diffstat (limited to 'libcrystfel/CMakeLists.txt')
-rw-r--r--libcrystfel/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt
index 7c8bd82b..2b43b024 100644
--- a/libcrystfel/CMakeLists.txt
+++ b/libcrystfel/CMakeLists.txt
@@ -59,7 +59,6 @@ set(LIBCRYSTFEL_SOURCES
src/detgeom.c
src/image-cbf.c
src/image-hdf5.c
- src/image-msgpack.c
${BISON_symopp_OUTPUTS}
${FLEX_symopl_OUTPUTS}
src/indexers/dirax.c
@@ -100,6 +99,10 @@ set(LIBCRYSTFEL_HEADERS
src/image-msgpack.h
)
+if (MSGPACK_FOUND)
+ set(LIBCRYSTFEL_SOURCES ${LIBCRYSTFEL_SOURCES} src/image-msgpack.c)
+endif (MSGPACK_FOUND)
+
if (DOXYGEN_FOUND)
configure_file(${PROJECT_SOURCE_DIR}/doc/index.md index.md)
set(DOXYGEN_SHOW_INCLUDE_FILES NO)