diff options
author | Thomas White <taw@physics.org> | 2020-09-10 15:36:36 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-09-10 15:36:36 +0200 |
commit | 64b61c7c4da1bb5f38becb857c712a3233b2c9c4 (patch) | |
tree | bd681d960d4665ea0c202ee258c56b9b209b79bd /libcrystfel/CMakeLists.txt | |
parent | 15fb78fad837096798742da619594be00269d004 (diff) |
CMake: Don't compile image-msgpack.c if library is not found
Diffstat (limited to 'libcrystfel/CMakeLists.txt')
-rw-r--r-- | libcrystfel/CMakeLists.txt | 5 |
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) |