diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-02-12 14:38:04 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-02-12 14:38:04 +0000 |
commit | 75a07dd38b4a491a9d16d24492bea5c6ba90a8ff (patch) | |
tree | 0a65094e22bba335545b8ffe4a33fe7790edb21c /modules/FindPCRE.cmake | |
parent | bce40e0de3b22a291ecaa2b75358e6a998e1579b (diff) | |
download | extra-cmake-modules-75a07dd38b4a491a9d16d24492bea5c6ba90a8ff.tar.gz extra-cmake-modules-75a07dd38b4a491a9d16d24492bea5c6ba90a8ff.tar.bz2 |
-moved the cmake code to find kdewin32 out of FindKDE4.cmake and into its own FindKDEWIN32.cmake file
-added a new FindGNUWIN32.cmake file, which tries to find the gnuwin32 base directory
-changed all "FOO_LIBRARY" variable names to "FOO_LIBRARIES" to be more consistent with the other cmake modules
-added a macro_getenv_win_path() which replaces all backslahes with slashes from environment variables
-modified the kde4_add_kcfg_files() command, so that the generated header is also processed by moc
-all tests compile and link
Alex
CCMAIL:kde-buildsystem@kde.org
The changes to the windows stuff are untested, since I don't have a windows box.
Please check that everything still works. Please have a look at FindGNUWIN32.cmake,
there are probably ways to improve this. The resulting GNUWIN32_DIR variable is used in other
cmake modules as default path to search for headers and libraries.
svn path=/trunk/KDE/kdelibs/; revision=508648
Diffstat (limited to 'modules/FindPCRE.cmake')
-rw-r--r-- | modules/FindPCRE.cmake | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake index fa61a430..5a78c6c1 100644 --- a/modules/FindPCRE.cmake +++ b/modules/FindPCRE.cmake @@ -1,34 +1,52 @@ +# - Try to find the PCRE regular expression library +# Once done this will define +# +# PCRE_FOUND - system has the PCRE library +# PCRE_INCLUDE_DIR - the PCRE include directory +# PCRE_LIBRARIES - The libraries needed to use PCRE +# under Windows this also checks in the GNUWIN32 directory, so make +# sure that the GNUWIN32 directory gets found if you use the GNUWIN32 version of PCRE +# + + +# under windows, try to find the base gnuwin32 directory, do nothing under UNIX +FIND_PACKAGE(GNUWIN32) FIND_PATH(PCRE_INCLUDE_DIR pcre.h -/usr/include/ -/usr/local/include/ + /usr/include/ + /usr/local/include/ + ${GNUWIN32_DIR}/include ) FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre -PATHS -/usr/lib -/usr/local/lib + PATHS + /usr/lib + /usr/local/lib + ${GNUWIN32_DIR}/lib ) FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix -PATHS -/usr/lib -/usr/local/lib + PATHS + /usr/lib + /usr/local/lib + ${GNUWIN32_DIR}/lib ) -SET(PCRE_LIBRARY ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY}) +SET(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE") -IF(PCRE_INCLUDE_DIR AND PCRE_LIBRARY) +IF(PCRE_INCLUDE_DIR AND PCRE_LIBRARIES) SET(PCRE_FOUND TRUE) -ENDIF(PCRE_INCLUDE_DIR AND PCRE_LIBRARY) +ENDIF(PCRE_INCLUDE_DIR AND PCRE_LIBRARIES) IF(PCRE_FOUND) IF(NOT PCRE_FIND_QUIETLY) - MESSAGE(STATUS "Found PCRE: ${PCRE_LIBRARY}") + MESSAGE(STATUS "Found PCRE: ${PCRE_LIBRARIES}") ENDIF(NOT PCRE_FIND_QUIETLY) ELSE(PCRE_FOUND) IF(PCRE_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find PCRE") ENDIF(PCRE_FIND_REQUIRED) ENDIF(PCRE_FOUND) + +MARK_AS_ADVANCED(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY) |