diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | config.h.cmake.in | 1 | ||||
-rw-r--r-- | config.h.in | 1 | ||||
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | src/gui_export.c | 2 |
5 files changed, 18 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 23aacde2..bdd31cb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ endif() pkg_search_module(CAIRO cairo) pkg_search_module(GDKPIXBUF gdk-pixbuf-2.0) +pkg_search_module(LIBCCP4 libccp4c) include(CheckCCompilerFlag) check_c_compiler_flag("-fdiagnostics-color=always" HAVE_DIAG_COLOR) @@ -119,6 +120,7 @@ set(HAVE_GDKPIXBUF ${GDKPIXBUF_FOUND}) set(HAVE_GDK ${GDK_FOUND}) set(HAVE_MSGPACK ${MSGPACK_FOUND}) set(HAVE_ZMQ ${ZMQ_FOUND}) +set(HAVE_LIBCCP4 ${LIBCCP4_FOUND}) set(PACKAGE_VERSION ${PROJECT_VERSION}) @@ -403,8 +405,10 @@ if (GTK_FOUND) add_executable(crystfel ${CRYSTFEL_GUI_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.c) - target_include_directories(crystfel PRIVATE ${COMMON_INCLUDES} ${GTK_INCLUDE_DIRS}) - target_link_libraries (crystfel ${COMMON_LIBRARIES} util ${GTK_LIBRARIES}) + target_include_directories(crystfel PRIVATE ${COMMON_INCLUDES} ${GTK_INCLUDE_DIRS} + ${LIBCCP4_INCLUDES}) + target_link_libraries (crystfel ${COMMON_LIBRARIES} util ${GTK_LIBRARIES} + ${LIBCCP4_LIBRARIES}) if (HAVE_SLURM) target_link_libraries(crystfel slurm) diff --git a/config.h.cmake.in b/config.h.cmake.in index d8c1cbfa..db1f6ec5 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -11,3 +11,4 @@ #cmakedefine HAVE_MSGPACK #cmakedefine HAVE_ZMQ #cmakedefine HAVE_SLURM +#cmakedefine HAVE_LIBCCP4 diff --git a/config.h.in b/config.h.in index 1d917494..59f4281a 100644 --- a/config.h.in +++ b/config.h.in @@ -11,3 +11,4 @@ #mesondefine HAVE_MSGPACK #mesondefine HAVE_ZMQ #mesondefine HAVE_SLURM +#mesondefine HAVE_LIBCCP4 diff --git a/meson.build b/meson.build index b7ba1c4b..21bfa2f6 100644 --- a/meson.build +++ b/meson.build @@ -94,6 +94,11 @@ if cc.has_function('clock_gettime', prefix : '#include <time.h>') conf_data.set10('HAVE_CLOCK_GETTIME', 1) endif +ccp4dep = dependency('libccp4c', required: false) +if ccp4dep.found() + conf_data.set10('HAVE_LIBCCP4', 1) +endif + # ************************ libcrystfel (subdir) ************************ subdir('libcrystfel') @@ -231,8 +236,10 @@ if gtkdep.found() gui_sources += 'src/gui_backend_slurm.c' endif + executable('crystfel', gui_sources, - dependencies : [mdep, libcrystfeldep, gtkdep, gsldep, slurmdep], + dependencies : [mdep, libcrystfeldep, gtkdep, gsldep, slurmdep, + ccp4dep], install : true, install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib') diff --git a/src/gui_export.c b/src/gui_export.c index 0daf8ae5..4f300594 100644 --- a/src/gui_export.c +++ b/src/gui_export.c @@ -350,10 +350,12 @@ gint export_sig(GtkWidget *widget, struct crystfelproject *proj) win->format = gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->format), FALSE, FALSE, 4.0); +#ifdef HAVE_LIBCCP4 gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(win->format), "mtz", "MTZ, plain"); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(win->format), "mtz-bij", "MTZ, Bijvoet pairs together"); +#endif gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(win->format), "xds", "XDS ASCII"); gtk_combo_box_set_active(GTK_COMBO_BOX(win->format), 0); |