]> git.proxmox.com Git - libgit2.git/blobdiff - cmake/FindPCRE.cmake
New upstream version 1.4.3+dfsg.1
[libgit2.git] / cmake / FindPCRE.cmake
index 74ed61e5391f63e6591a51f1155b35601f8a4a0b..3a7cfad919c562de7ac0fc752425c211a1984063 100644 (file)
 # PCRE_FOUND   - True if pcre found.
 
 # Look for the header file.
-FIND_PATH(PCRE_INCLUDE_DIR NAMES pcreposix.h)
+find_path(PCRE_INCLUDE_DIR NAMES pcreposix.h)
 
 # Look for the library.
-FIND_LIBRARY(PCRE_LIBRARY NAMES pcre)
-FIND_LIBRARY(PCRE_POSIX_LIBRARY NAMES pcreposix)
+find_library(PCRE_LIBRARY NAMES pcre)
+find_library(PCRE_POSIX_LIBRARY NAMES pcreposix)
 
 # Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_POSIX_LIBRARY PCRE_INCLUDE_DIR)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_POSIX_LIBRARY PCRE_INCLUDE_DIR)
 
 # Copy the results to the output variables.
-IF(PCRE_FOUND)
-       SET(PCRE_LIBRARIES ${PCRE_LIBRARY} ${PCRE_POSIX_LIBRARY})
-       SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
-ELSE(PCRE_FOUND)
-       SET(PCRE_LIBRARIES)
-       SET(PCRE_INCLUDE_DIRS)
-ENDIF(PCRE_FOUND)
+if(PCRE_FOUND)
+       set(PCRE_LIBRARIES ${PCRE_LIBRARY} ${PCRE_POSIX_LIBRARY})
+       set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
+else(PCRE_FOUND)
+       set(PCRE_LIBRARIES)
+       set(PCRE_INCLUDE_DIRS)
+endif()
 
-MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES)
+mark_as_advanced(PCRE_INCLUDE_DIRS PCRE_LIBRARIES)