summaryrefslogtreecommitdiff
path: root/deps/pcre/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'deps/pcre/CMakeLists.txt')
-rw-r--r--deps/pcre/CMakeLists.txt176
1 files changed, 88 insertions, 88 deletions
diff --git a/deps/pcre/CMakeLists.txt b/deps/pcre/CMakeLists.txt
index aff2d751b..431dda01a 100644
--- a/deps/pcre/CMakeLists.txt
+++ b/deps/pcre/CMakeLists.txt
@@ -1,95 +1,95 @@
-INCLUDE(CheckIncludeFile)
-INCLUDE(CheckFunctionExists)
-INCLUDE(CheckTypeSize)
-
-CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
-CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
-CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
-
-CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY)
-CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
-CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
-CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
-CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ)
-CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64)
-
-CHECK_TYPE_SIZE("long long" LONG_LONG)
-CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG)
-
-DISABLE_WARNINGS(unused-function)
-DISABLE_WARNINGS(implicit-fallthrough)
+include(CheckIncludeFile)
+include(CheckFunctionExists)
+include(CheckTypeSize)
+
+check_include_file(dirent.h HAVE_DIRENT_H)
+check_include_file(stdint.h HAVE_STDINT_H)
+check_include_file(inttypes.h HAVE_INTTYPES_H)
+check_include_file(sys/stat.h HAVE_SYS_STAT_H)
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(unistd.h HAVE_UNISTD_H)
+check_include_file(windows.h HAVE_WINDOWS_H)
+
+check_function_exists(bcopy HAVE_BCOPY)
+check_function_exists(memmove HAVE_MEMMOVE)
+check_function_exists(strerror HAVE_STRERROR)
+check_function_exists(strtoll HAVE_STRTOLL)
+check_function_exists(strtoq HAVE_STRTOQ)
+check_function_exists(_strtoi64 HAVE__STRTOI64)
+
+check_type_size("long long" LONG_LONG)
+check_type_size("unsigned long long" UNSIGNED_LONG_LONG)
+
+disable_warnings(unused-function)
+disable_warnings(implicit-fallthrough)
# User-configurable options
-SET(SUPPORT_PCRE8 1)
-SET(PCRE_LINK_SIZE "2")
-SET(PCRE_PARENS_NEST_LIMIT "250")
-SET(PCRE_MATCH_LIMIT "10000000")
-SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT")
-SET(PCRE_NEWLINE "LF")
-SET(NO_RECURSE 1)
-SET(PCRE_POSIX_MALLOC_THRESHOLD "10")
-SET(BSR_ANYCRLF 0)
-
-IF (MINGW)
- OPTION(NON_STANDARD_LIB_PREFIX
- "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc."
- OFF)
-
- OPTION(NON_STANDARD_LIB_SUFFIX
- "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc."
- OFF)
-ENDIF(MINGW)
+set(SUPPORT_PCRE8 1)
+set(PCRE_LINK_SIZE "2")
+set(PCRE_PARENS_NEST_LIMIT "250")
+set(PCRE_MATCH_LIMIT "10000000")
+set(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT")
+set(PCRE_NEWLINE "LF")
+set(NO_RECURSE 1)
+set(PCRE_POSIX_MALLOC_THRESHOLD "10")
+set(BSR_ANYCRLF 0)
+
+if(MINGW)
+ option(NON_STANDARD_LIB_PREFIX
+ "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc."
+ OFF)
+
+ option(NON_STANDARD_LIB_SUFFIX
+ "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc."
+ OFF)
+endif(MINGW)
# Prepare build configuration
-SET(pcre_have_long_long 0)
-SET(pcre_have_ulong_long 0)
-
-IF(HAVE_LONG_LONG)
- SET(pcre_have_long_long 1)
-ENDIF(HAVE_LONG_LONG)
-
-IF(HAVE_UNSIGNED_LONG_LONG)
- SET(pcre_have_ulong_long 1)
-ENDIF(HAVE_UNSIGNED_LONG_LONG)
-
-SET(NEWLINE "")
-
-IF(PCRE_NEWLINE STREQUAL "LF")
- SET(NEWLINE "10")
-ENDIF(PCRE_NEWLINE STREQUAL "LF")
-IF(PCRE_NEWLINE STREQUAL "CR")
- SET(NEWLINE "13")
-ENDIF(PCRE_NEWLINE STREQUAL "CR")
-IF(PCRE_NEWLINE STREQUAL "CRLF")
- SET(NEWLINE "3338")
-ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
-IF(PCRE_NEWLINE STREQUAL "ANY")
- SET(NEWLINE "-1")
-ENDIF(PCRE_NEWLINE STREQUAL "ANY")
-IF(PCRE_NEWLINE STREQUAL "ANYCRLF")
- SET(NEWLINE "-2")
-ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF")
-
-IF(NEWLINE STREQUAL "")
- MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")
-ENDIF(NEWLINE STREQUAL "")
+set(pcre_have_long_long 0)
+set(pcre_have_ulong_long 0)
+
+if(HAVE_LONG_LONG)
+ set(pcre_have_long_long 1)
+endif(HAVE_LONG_LONG)
+
+if(HAVE_UNSIGNED_LONG_LONG)
+ set(pcre_have_ulong_long 1)
+endif(HAVE_UNSIGNED_LONG_LONG)
+
+set(NEWLINE "")
+
+if(PCRE_NEWLINE STREQUAL "LF")
+ set(NEWLINE "10")
+endif(PCRE_NEWLINE STREQUAL "LF")
+if(PCRE_NEWLINE STREQUAL "CR")
+ set(NEWLINE "13")
+endif(PCRE_NEWLINE STREQUAL "CR")
+if(PCRE_NEWLINE STREQUAL "CRLF")
+ set(NEWLINE "3338")
+endif(PCRE_NEWLINE STREQUAL "CRLF")
+if(PCRE_NEWLINE STREQUAL "ANY")
+ set(NEWLINE "-1")
+endif(PCRE_NEWLINE STREQUAL "ANY")
+if(PCRE_NEWLINE STREQUAL "ANYCRLF")
+ set(NEWLINE "-2")
+endif(PCRE_NEWLINE STREQUAL "ANYCRLF")
+
+if(NEWLINE STREQUAL "")
+ message(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")
+endif(NEWLINE STREQUAL "")
# Output files
-CONFIGURE_FILE(config.h.in
+configure_file(config.h.in
${PROJECT_BINARY_DIR}/src/pcre/config.h
@ONLY)
# Source code
-SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/src/pcre/config.h)
+set(PCRE_HEADERS ${PROJECT_BINARY_DIR}/src/pcre/config.h)
-SET(PCRE_SOURCES
+set(PCRE_SOURCES
pcre_byte_order.c
pcre_chartables.c
pcre_compile.c
@@ -113,28 +113,28 @@ SET(PCRE_SOURCES
pcre_xclass.c
)
-SET(PCREPOSIX_HEADERS pcreposix.h)
+set(PCREPOSIX_HEADERS pcreposix.h)
-SET(PCREPOSIX_SOURCES pcreposix.c)
+set(PCREPOSIX_SOURCES pcreposix.c)
# Fix static compilation with MSVC: https://bugs.exim.org/show_bug.cgi?id=1681
# This code was taken from the CMake wiki, not from WebM.
# Build setup
-ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+add_definitions(-DHAVE_CONFIG_H)
-IF(MSVC)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
-ENDIF(MSVC)
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
+endif(MSVC)
-SET(CMAKE_INCLUDE_CURRENT_DIR 1)
+set(CMAKE_INCLUDE_CURRENT_DIR 1)
-SET(targets)
+set(targets)
# Libraries
# pcre
-INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/src/pcre)
-ADD_LIBRARY(pcre OBJECT ${PCRE_HEADERS} ${PCRE_SOURCES} ${PCREPOSIX_SOURCES})
+include_directories(${PROJECT_BINARY_DIR}/src/pcre)
+add_library(pcre OBJECT ${PCRE_HEADERS} ${PCRE_SOURCES} ${PCREPOSIX_SOURCES})
# end CMakeLists.txt