summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-08 03:07:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-08 03:07:46 -0600
commitb911168351033cde8e3b524060722e0001c27bda (patch)
tree15f51b276fad5454bfddd75c3f93d38779ad7a9a
parent87201a3741bd9d4b4638be7b3d8c44a737115b0f (diff)
downloadtdelibs-b911168351033cde8e3b524060722e0001c27bda.tar.gz
tdelibs-b911168351033cde8e3b524060722e0001c27bda.zip
Add pcre detection to tdelibs CMake files
This closes Bug 569
-rw-r--r--CMakeLists.txt11
-rw-r--r--config.h.cmake2
-rw-r--r--kjs/CMakeLists.txt4
3 files changed, 15 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 939a6da36..420eed83d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,6 +76,7 @@ OPTION( WITH_OPENEXR "Enable openexr support" OFF )
OPTION( WITH_UTEMPTER "Use utempter for utmp management" OFF )
OPTION( WITH_AVAHI "Enable AVAHI support" OFF )
OPTION( WITH_ELFICON "Enable ELF embedded icon support" OFF )
+OPTION( WITH_PCRE "Enable pcre regex support for kjs" ON )
OPTION( WITH_ASPELL "Enable aspell support" OFF )
OPTION( WITH_HSPELL "Enable hspell support" OFF )
@@ -736,6 +737,16 @@ if( WITH_ELFICON )
endif( )
+##### check for pcre ###########################
+
+if( WITH_PCRE )
+ pkg_search_module( LIBPCRE libpcre )
+ if( NOT LIBPCRE_FOUND )
+ message(FATAL_ERROR "\npcre support are requested, but not found on your system" )
+ endif( NOT LIBPCRE_FOUND )
+ set( HAVE_PCREPOSIX 1 )
+endif( )
+
##### check for aspell ##########################
# we need ASPELL_DATADIR too
diff --git a/config.h.cmake b/config.h.cmake
index 80b8d071c..a53b346a9 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -369,7 +369,7 @@
#cmakedefine HAVE_PATHS_H 1
/* Define if you have pcreposix libraries and header files. */
-#undef HAVE_PCREPOSIX
+#cmakedefine HAVE_PCREPOSIX 1
/* Define to 1 if you have the `poll' function. */
#cmakedefine HAVE_POLL 1
diff --git a/kjs/CMakeLists.txt b/kjs/CMakeLists.txt
index d668b6c08..ac6697cbd 100644
--- a/kjs/CMakeLists.txt
+++ b/kjs/CMakeLists.txt
@@ -15,10 +15,12 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/tdecore
+ ${LIBPCRE_INCLUDEDIR}
)
link_directories(
${TQT_LIBRARY_DIRS}
+ ${LIBPCRE_LIBDIR}
)
@@ -59,6 +61,6 @@ tde_add_lut( keywords.table lexer.lut.h lexer.cpp )
tde_add_library( ${target} SHARED
SOURCES ${${target}_SRCS}
VERSION 1.2.0
- LINK tdecore-shared
+ LINK tdecore-shared ${LIBPCRE_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)