From 40fbda609fb6c8f8c6346ad22ddc639828bdd88c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 30 Jul 2011 00:14:57 +0400 Subject: [PATCH] Another fix for out-source build. Unbreak FreeBSD build. --- CMakeLists.txt | 2 +- contrib/lgpl/CMakeLists.txt | 1 + lib/CMakeLists.txt | 3 ++- src/client/CMakeLists.txt | 1 + src/json/hashtable.c | 2 +- src/json/hashtable.h | 2 +- src/json/strbuffer.c | 2 +- src/json/utf.c | 2 +- 8 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ccd9d90a..6bfc718b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,7 +218,6 @@ ENDIF(PCRE_INCLUDE_DIRS) IF(PCRE_LIBRARY_DIRS) LINK_DIRECTORIES("${PCRE_LIBRARY_DIRS}") ENDIF(PCRE_LIBRARY_DIRS) -LIST(APPEND CMAKE_REQUIRED_LIBRARIES "pcre") IF(ENABLE_STATIC MATCHES "ON") pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.12) @@ -647,6 +646,7 @@ IF(LIBJUDY_LIBRARY) TARGET_LINK_LIBRARIES(rspamd Judy) ENDIF(LIBJUDY_LIBRARY) TARGET_LINK_LIBRARIES(rspamd event) +TARGET_LINK_LIBRARIES(rspamd pcre) TARGET_LINK_LIBRARIES(rspamd ${CMAKE_REQUIRED_LIBRARIES}) TARGET_LINK_LIBRARIES(rspamd ${GLIB2_LIBRARIES}) diff --git a/contrib/lgpl/CMakeLists.txt b/contrib/lgpl/CMakeLists.txt index 0973e2243..56cedff89 100644 --- a/contrib/lgpl/CMakeLists.txt +++ b/contrib/lgpl/CMakeLists.txt @@ -14,6 +14,7 @@ IF(GLIB2_VERSION VERSION_LESS "2.16") TARGET_LINK_LIBRARIES(glibadditions ${CMAKE_REQUIRED_LIBRARIES}) TARGET_LINK_LIBRARIES(glibadditions ${GLIB2_LIBRARIES}) + TARGET_LINK_LIBRARIES(glibadditions pcre) SET_TARGET_PROPERTIES(glibadditions PROPERTIES VERSION ${RSPAMD_VERSION}) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 655e02303..6071c0e78 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -8,6 +8,7 @@ SET_TARGET_PROPERTIES(rspamdclient PROPERTIES PUBLIC_HEADER "librspamdclient.h") SET_TARGET_PROPERTIES(rspamdclient_static PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") TARGET_LINK_LIBRARIES(rspamdclient ${CMAKE_REQUIRED_LIBRARIES}) +TARGET_LINK_LIBRARIES(rspamdclient pcre) TARGET_LINK_LIBRARIES(rspamdclient ${GLIB2_LIBRARIES}) TARGET_LINK_LIBRARIES(rspamdclient_static ${CMAKE_REQUIRED_LIBRARIES}) @@ -70,4 +71,4 @@ SET_TARGET_PROPERTIES(rspamdserver PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(rspamdserver PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB") TARGET_LINK_LIBRARIES(rspamdserver rspamd_lua) TARGET_LINK_LIBRARIES(rspamdserver rspamd_json) -TARGET_LINK_LIBRARIES(rspamdserver rspamd_cdb) \ No newline at end of file +TARGET_LINK_LIBRARIES(rspamdserver rspamd_cdb) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 1f2a50b09..37ca91043 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -5,6 +5,7 @@ ADD_EXECUTABLE(rspamc ${RSPAMCSRC}) SET_TARGET_PROPERTIES(rspamc PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/lib") TARGET_LINK_LIBRARIES(rspamc rspamdserver) TARGET_LINK_LIBRARIES(rspamc rspamdclient) +TARGET_LINK_LIBRARIES(rspamc pcre) TARGET_LINK_LIBRARIES(rspamc ${CMAKE_REQUIRED_LIBRARIES}) TARGET_LINK_LIBRARIES(rspamc ${GLIB2_LIBRARIES}) SET_TARGET_PROPERTIES(rspamc PROPERTIES VERSION ${RSPAMD_VERSION}) diff --git a/src/json/hashtable.c b/src/json/hashtable.c index 14a59aff1..92d83eea1 100644 --- a/src/json/hashtable.c +++ b/src/json/hashtable.c @@ -5,7 +5,7 @@ * it under the terms of the MIT license. See LICENSE for details. */ -#include "../config.h" +#include "config.h" #include "hashtable.h" typedef struct hashtable_list list_t; diff --git a/src/json/hashtable.h b/src/json/hashtable.h index 30e52daa8..35196b0c0 100644 --- a/src/json/hashtable.h +++ b/src/json/hashtable.h @@ -8,7 +8,7 @@ #ifndef HASHTABLE_H #define HASHTABLE_H -#include "../config.h" +#include "config.h" typedef unsigned int (*key_hash_fn)(const void *key); typedef int (*key_cmp_fn)(const void *key1, const void *key2); diff --git a/src/json/strbuffer.c b/src/json/strbuffer.c index b6afcc248..1ae336d3d 100644 --- a/src/json/strbuffer.c +++ b/src/json/strbuffer.c @@ -5,7 +5,7 @@ * it under the terms of the MIT license. See LICENSE for details. */ -#include "../config.h" +#include "config.h" #include "strbuffer.h" #include "util.h" diff --git a/src/json/utf.c b/src/json/utf.c index b02630812..7635bef8a 100644 --- a/src/json/utf.c +++ b/src/json/utf.c @@ -5,7 +5,7 @@ * it under the terms of the MIT license. See LICENSE for details. */ -#include "../config.h" +#include "config.h" int utf8_encode (int codepoint, char *buffer, int *size) -- 2.39.5