ENDIF(ENABLE_STATIC MATCHES "ON")
FOREACH(_arg ${${_XPREFIX}_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("${_arg}")
- SET(${var}_INCLUDE_DIR "${_arg}")
+ SET(${var}_INCLUDE "${_arg}")
ENDFOREACH(_arg ${${_XPREFIX}_INCLUDE_DIRS})
FOREACH(_arg ${${_XPREFIX}_LIBRARY_DIRS})
LINK_DIRECTORIES("${_arg}")
+ SET(${var}_LIBRARY "${_arg}")
ENDFOREACH(_arg ${${_XPREFIX}_LIBRARY_DIRS})
# Handle other CFLAGS and LDFLAGS
FOREACH(_arg ${${_XPREFIX}_CFLAGS_OTHER})
GET_FILENAME_COMPONENT(_lib_path "${_lib}" PATH)
INCLUDE_DIRECTORIES("${_incl}")
LINK_DIRECTORIES("${_lib_path}")
+ SET(${var}_INCLUDE "${_incl}")
+ SET(${var}_LIBRARY "${_lib_path}")
MESSAGE(STATUS "Found ${_name0} ${ARGN} in '${_lib_path}' (library) and '${_incl}' (include).")
ENDIF(${var}_FOUND)
ELSE(NOT RSPAMD_SEARCH_PATH)
INCLUDE_DIRECTORIES("${_incl}")
LINK_DIRECTORIES("${_lib_path}")
MESSAGE(STATUS "Found ${_name0} ${ARGN} in '${_lib_path}' (library) and '${_incl}' (include).")
+ SET(${var}_INCLUDE "${_incl}")
+ SET(${var}_LIBRARY "${_lib_path}")
ENDIF(_incl)
ENDIF(_lib)
ENDIF(ENABLE_STATIC MATCHES "ON")
FOREACH(_arg ${${_XPREFIX}_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("${_arg}")
- SET(${var}_INCLUDE_DIR "${_arg}")
+ SET(${var}_INCLUDE "${_arg}")
ENDFOREACH(_arg ${${_XPREFIX}_INCLUDE_DIRS})
FOREACH(_arg ${${_XPREFIX}_LIBRARY_DIRS})
LINK_DIRECTORIES("${_arg}")
+ SET(${var}_LIBRARY "${_arg}")
ENDFOREACH(_arg ${${_XPREFIX}_LIBRARY_DIRS})
# Handle other CFLAGS and LDFLAGS
FOREACH(_arg ${${_XPREFIX}_CFLAGS_OTHER})
# Workaround with architecture specific includes
IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
- SET(CMAKE_REQUIRED_INCLUDES "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
+ LIST(APPEND CMAKE_REQUIRED_INCLUDES "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
ENDIF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")
LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
IF(GMIME2_VERSION VERSION_GREATER "2.4.0")
SET(GMIME24 1)
ENDIF(GMIME2_VERSION VERSION_GREATER "2.4.0")
-LIST(APPEND CMAKE_REQUIRED_INCLUDES "${PCRE_INCLUDE_DIR}")
-
+LIST(APPEND CMAKE_REQUIRED_INCLUDES "${PCRE_INCLUDE}")
+SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};-L${PCRE_LIBRARY};-lpcre")
# Libhiredis pc file is so special
FIND_PATH(LIBHIREDIS_INCLUDE hiredis.h
HINTS "${RSPAMD_SEARCH_PATH}"
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
CHECK_INCLUDE_FILES(cpuid.h HAVE_CPUID_H)
-# Some dependencies
-IF(HAVE_SYS_WAIT_H)
- LIST(APPEND CMAKE_REQUIRED_INCLUDES sys/wait.h)
-ENDIF(HAVE_SYS_WAIT_H)
-IF(HAVE_TIME_H)
- LIST(APPEND CMAKE_REQUIRED_INCLUDES time.h)
-ENDIF(HAVE_TIME_H)
-IF(HAVE_SYS_TIME_H)
- LIST(APPEND CMAKE_REQUIRED_INCLUDES sys/time.h)
-ENDIF(HAVE_SYS_TIME_H)
-
# Check platform API
CHECK_FUNCTION_EXISTS(setproctitle HAVE_SETPROCTITLE)
CHECK_FUNCTION_EXISTS(getpagesize HAVE_GETPAGESIZE)
}
")
-SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} -lpcre")
-CHECK_C_SOURCE_COMPILES("${_PCRE_FAST_TEST}" _PCRE_JIT_FAST)
-IF(_PCRE_JIT_FAST)
- SET(HAVE_PCRE_JIT_FAST 1)
+CHECK_C_SOURCE_COMPILES("${_PCRE_FAST_TEST}" HAVE_PCRE_JIT_FAST)
+IF(HAVE_PCRE_JIT_FAST)
MESSAGE(STATUS "pcre_jit_exec is supported")
-ELSE(_PCRE_JIT_FAST)
+ELSE(HAVE_PCRE_JIT_FAST)
MESSAGE(STATUS "pcre_jit_exec is -NOT- supported")
-ENDIF(_PCRE_JIT_FAST)
+ENDIF(HAVE_PCRE_JIT_FAST)
FILE(WRITE ${CMAKE_BINARY_DIR}/pthread_setpshared.c "
#include <pthread.h>