aboutsummaryrefslogtreecommitdiff
path: root/modules/FindPCRE.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindPCRE.cmake')
-rw-r--r--modules/FindPCRE.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake
index f0cc940d..0eba2e3a 100644
--- a/modules/FindPCRE.cmake
+++ b/modules/FindPCRE.cmake
@@ -4,27 +4,27 @@
# PCRE_FOUND - system has the PCRE library
# PCRE_INCLUDE_DIR - the PCRE include directory
# PCRE_LIBRARIES - The libraries needed to use PCRE
-#
+
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-if (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)
+if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)
# Already in cache, be silent
set(PCRE_FIND_QUIETLY TRUE)
-endif (PCRE_INCLUDE_DIR AND PCRE_LIBRARIES AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)
+endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)
-FIND_PATH(PCRE_INCLUDE_DIR pcre.h )
+FIND_PATH(PCRE_INCLUDE_DIR pcre.h PATH_SUFFIXES pcre)
FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre)
FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix)
-set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE")
-
include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_LIBRARIES )
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY )
+
+set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} CACHE STRING "The libraries needed to use PCRE")
MARK_AS_ADVANCED(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY)