diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-11 15:38:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-11 15:38:25 +0100 |
commit | 2b79a6ac22863d65e466d85797b0efac7bbffff0 (patch) | |
tree | f2129acf6234e4984d840e8a4a7011d17ccf7a56 /CMakeLists.txt | |
parent | 48c605c605beec037574a7e28dab0f1438a0c51a (diff) | |
download | rspamd-2b79a6ac22863d65e466d85797b0efac7bbffff0.tar.gz rspamd-2b79a6ac22863d65e466d85797b0efac7bbffff0.zip |
Try to fix libutil...
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e6ee154..0e2c98d9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -535,16 +535,20 @@ FIND_LIBRARY(LIBUTIL_LIBRARY NAMES util PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS} DOC "Path where the libutil library can be found") IF(LIBUTIL_LIBRARY) - FIND_FILE(HAVE_LIBUTIL_H + FIND_FILE(_LIBUTIL_H HINTS "${RSPAMD_SEARCH_PATH}" NAMES libutil.h PATH ${RSPAMD_DEFAULT_INCLUDE_PATHS} PATH_SUFFIXES include DOC "Path to libutil header") - IF(HAVE_LIBUTIL_H) + IF(_LIBUTIL_H) + SET(HAVE_LIBUTIL_H 1) + INCLUDE_DIRECTORIES(${_LIBUTIL_H}) + LIST(APPEND CMAKE_REQUIRED_INCLUDES ${_LIBUTIL_H}) + SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} -L${LIBUTIL_LIBRARY};-lutil") LIST(APPEND RSPAMD_REQUIRED_LIBRARIES util) CHECK_FUNCTION_EXISTS(pidfile_open HAVE_PIDFILE) CHECK_FUNCTION_EXISTS(pidfile_fileno HAVE_PIDFILE_FILENO) - ENDIF(HAVE_LIBUTIL_H) + ENDIF(_LIBUTIL_H) ENDIF(LIBUTIL_LIBRARY) # Find libfetch (for FreeBSD) |