aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-17 12:12:01 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commit3972e0d898a73374838d9ea5b69570757f4b161c (patch)
tree3c59bf4ce9cdf1740f284a926e4d3c94e968b834 /CMakeLists.txt
parent14dd1029b41e5b50428160a56d025b0e56141f94 (diff)
Actually run indexamajig
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a724af52..0ddee846 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,19 @@ else ()
message(STATUS "ZMQ not found.")
endif ()
+# Find out where forkpty() is declared
+set(CMAKE_REQUIRED_LIBRARIES "-lutil")
+check_symbol_exists(forkpty "pty.h" HAVE_FORKPTY_PTY_H)
+check_symbol_exists(forkpty "util.h" HAVE_FORKPTY_UTIL_H)
+unset(CMAKE_REQUIRED_LIBRARIES)
+if(HAVE_FORKPTY_PTY_H)
+ message(STATUS "Found forkpty() in pty.h")
+elseif(HAVE_FORKPTY_UTIL_H)
+ message(STATUS "Found forkpty() in util.h")
+else()
+ message(SEND_ERROR "Couldn't find forkpty()")
+endif()
+
pkg_search_module(GTK gtk+-3.0)
if (NOT GTK_FOUND)
@@ -376,7 +389,7 @@ if (GTK_FOUND)
add_executable(crystfel ${CRYSTFEL_GUI_SOURCES})
target_include_directories(crystfel PRIVATE ${COMMON_INCLUDES} ${GTK_INCLUDE_DIRS})
- target_link_libraries(crystfel ${COMMON_LIBRARIES} ${GTK_LIBRARIES})
+ target_link_libraries(crystfel ${COMMON_LIBRARIES} util ${GTK_LIBRARIES})
list(APPEND CRYSTFEL_EXECUTABLES crystfel)