aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-22 11:26:35 +0100
committerThomas White <taw@physics.org>2018-03-22 15:05:03 +0100
commitfba58042c236d8ceec09c7310583797401eda0ab (patch)
tree3b287cd00501d915524b76b13e46787f1fd35cff /libcrystfel
parent2d71de8b4d932bb71906b7437334c0f189e139b5 (diff)
Test for Curses
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/CMakeLists.txt5
-rw-r--r--libcrystfel/src/integration.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt
index 9a05c1a0..5d0ee069 100644
--- a/libcrystfel/CMakeLists.txt
+++ b/libcrystfel/CMakeLists.txt
@@ -111,6 +111,11 @@ if (CBF_FOUND)
target_link_libraries(${PROJECT_NAME} PRIVATE ${CBF_LIBRARIES})
endif (CBF_FOUND)
+if (CURSES_FOUND)
+ target_include_directories(${PROJECT_NAME} PRIVATE ${CURSES_INCLUDE_DIRS})
+ target_link_libraries(${PROJECT_NAME} PRIVATE ${CURSES_LIBRARIES})
+endif (CURSES_FOUND)
+
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)
install (TARGETS libcrystfel
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index c18ae110..d7a34954 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -39,7 +39,7 @@
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_eigen.h>
-#ifdef HAVE_CURSES_COLOR
+#ifdef HAVE_CURSES
#include <ncurses.h>
#endif
@@ -177,7 +177,7 @@ static float boxi(struct intcontext *ic, struct peak_box *bx, int p, int q)
}
-#ifdef HAVE_CURSES_COLOR
+#ifdef HAVE_CURSES
static void colour_on(enum boxmask_val b)
{
switch ( b ) {
@@ -225,7 +225,7 @@ static void colour_off(enum boxmask_val b)
#endif
-#ifdef HAVE_CURSES_COLOR
+#ifdef HAVE_CURSES
static void show_reference_profile(struct intcontext *ic, int i)
{
int q;
@@ -254,7 +254,7 @@ static void show_reference_profile(struct intcontext *ic, int i)
static void show_peak_box(struct intcontext *ic, struct peak_box *bx,
pthread_mutex_t *term_lock)
{
-#ifdef HAVE_CURSES_COLOR
+#ifdef HAVE_CURSES
int q;
signed int h, k, l;
double fs, ss;