| 1 |
# CMakeLists.txt |
# CMakeLists.txt |
| 2 |
# |
# |
| 3 |
|
# |
| 4 |
# This file allows building PCRE with the CMake configuration and build |
# This file allows building PCRE with the CMake configuration and build |
| 5 |
# tool. Download CMake in source or binary form from http://www.cmake.org/ |
# tool. Download CMake in source or binary form from http://www.cmake.org/ |
| 6 |
# |
# |
| 7 |
# Original listfile by Christian Ehrlicher <Ch.Ehrlicher@gmx.de> |
# Original listfile by Christian Ehrlicher <Ch.Ehrlicher@gmx.de> |
| 8 |
# Refined and expanded by Daniel Richard G. <skunk@iSKUNK.ORG> |
# Refined and expanded by Daniel Richard G. <skunk@iSKUNK.ORG> |
| 9 |
# |
# 2007-09-14 mod by Sheri so 7.4 supported configuration options can be entered |
| 10 |
|
# 2007-09-19 Adjusted by PH to retain previous default settings |
| 11 |
|
# 2007-12-26 (a) On UNIX, use names libpcre instead of just pcre |
| 12 |
|
# (b) Ensure pcretest and pcregrep link with the local library, |
| 13 |
|
# not a previously-installed one. |
| 14 |
|
# (c) Add PCRE_SUPPORT_LIBREADLINE, PCRE_SUPPORT_LIBZ, and |
| 15 |
|
# PCRE_SUPPORT_LIBBZ2. |
| 16 |
|
# 2008-01-20 Brought up to date to include several new features by Christian |
| 17 |
|
# Ehrlicher. |
| 18 |
|
# 2008-01-22 Sheri added options for backward compatibility of library names |
| 19 |
|
# when building with minGW: |
| 20 |
|
# if "ON", NON_STANDARD_LIB_PREFIX causes shared libraries to |
| 21 |
|
# be built without "lib" as prefix. (The libraries will be named |
| 22 |
|
# pcre.dll, pcreposix.dll and pcrecpp.dll). |
| 23 |
|
# if "ON", NON_STANDARD_LIB_SUFFIX causes shared libraries to |
| 24 |
|
# be built with suffix of "-0.dll". (The libraries will be named |
| 25 |
|
# libpcre-0.dll, libpcreposix-0.dll and libpcrecpp-0.dll - same names |
| 26 |
|
# built by default with Configure and Make. |
| 27 |
|
# 2008-01-23 PH removed the automatic build of pcredemo. |
| 28 |
|
# 2008-04-22 PH modified READLINE support so it finds NCURSES when needed. |
| 29 |
|
# 2008-07-03 PH updated for revised UCP property support (change of files) |
| 30 |
|
# 2009-03-23 PH applied Steven Van Ingelgem's patch to change the name |
| 31 |
|
# CMAKE_BINARY_DIR to PROJECT_BINARY_DIR so that it works when PCRE |
| 32 |
|
# is included within another project. |
| 33 |
|
# 2009-03-23 PH applied a modified version of Steven Van Ingelgem's patches to |
| 34 |
|
# add options to stop the building of pcregrep and the tests, and |
| 35 |
|
# to disable the final configuration report. |
| 36 |
|
# 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that |
| 37 |
|
# are set by specifying a release type. |
| 38 |
|
# 2010-01-02 PH added test for stdint.h |
| 39 |
|
# 2010-03-02 PH added test for inttypes.h |
| 40 |
|
# 2011-08-01 PH added PCREGREP_BUFSIZE |
| 41 |
|
# 2011-08-22 PH added PCRE_SUPPORT_JIT |
| 42 |
|
# 2011-09-06 PH modified WIN32 ADD_TEST line as suggested by Sergey Cherepanov |
| 43 |
|
# 2011-09-06 PH added PCRE_SUPPORT_PCREGREP_JIT |
| 44 |
|
|
| 45 |
PROJECT(PCRE C CXX) |
PROJECT(PCRE C CXX) |
| 46 |
|
|
| 47 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6) |
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6) |
| 48 |
|
|
| 49 |
|
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake |
| 50 |
|
|
| 51 |
|
# external packages |
| 52 |
|
FIND_PACKAGE( BZip2 ) |
| 53 |
|
FIND_PACKAGE( ZLIB ) |
| 54 |
|
FIND_PACKAGE( Readline ) |
| 55 |
|
|
| 56 |
# Configuration checks |
# Configuration checks |
| 57 |
|
|
| 58 |
INCLUDE(CheckIncludeFile) |
INCLUDE(CheckIncludeFile) |
| 60 |
INCLUDE(CheckFunctionExists) |
INCLUDE(CheckFunctionExists) |
| 61 |
INCLUDE(CheckTypeSize) |
INCLUDE(CheckTypeSize) |
| 62 |
|
|
| 63 |
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) |
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) |
| 64 |
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) |
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) |
| 65 |
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) |
CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H) |
| 66 |
CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) |
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) |
| 67 |
|
CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) |
| 68 |
CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H) |
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) |
| 69 |
CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H) |
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) |
| 70 |
|
|
| 71 |
CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) |
CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H) |
| 72 |
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) |
CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H) |
| 73 |
CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) |
|
| 74 |
|
CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) |
| 75 |
|
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) |
| 76 |
|
CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) |
| 77 |
|
CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL) |
| 78 |
|
CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ) |
| 79 |
|
CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64) |
| 80 |
|
|
| 81 |
CHECK_TYPE_SIZE("long long" LONG_LONG) |
CHECK_TYPE_SIZE("long long" LONG_LONG) |
| 82 |
CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) |
CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) |
| 83 |
|
|
| 84 |
# User-configurable options |
# User-configurable options |
| 85 |
# |
# |
| 103 |
SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING |
SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING |
| 104 |
"Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.") |
"Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.") |
| 105 |
|
|
| 106 |
|
SET(PCREGREP_BUFSIZE "20480" CACHE STRING |
| 107 |
|
"Buffer size parameter for pcregrep. See PCREGREP_BUFSIZE in config.h.in for details.") |
| 108 |
|
|
| 109 |
SET(PCRE_NEWLINE "LF" CACHE STRING |
SET(PCRE_NEWLINE "LF" CACHE STRING |
| 110 |
"What to recognize as a newline (one of CR, LF, CRLF, ANY).") |
"What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).") |
| 111 |
|
|
| 112 |
SET(PCRE_NO_RECURSE OFF CACHE BOOL |
SET(PCRE_NO_RECURSE OFF CACHE BOOL |
| 113 |
"If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") |
"If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") |
| 115 |
SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING |
SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING |
| 116 |
"Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.") |
"Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.") |
| 117 |
|
|
| 118 |
|
SET(PCRE_SUPPORT_JIT OFF CACHE BOOL |
| 119 |
|
"Enable support for Just-in-time compiling.") |
| 120 |
|
|
| 121 |
|
SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL |
| 122 |
|
"Enable use of Just-in-time compiling in pcregrep.") |
| 123 |
|
|
| 124 |
SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL |
SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL |
| 125 |
"Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)") |
"Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)") |
| 126 |
|
|
| 127 |
SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL |
SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL |
| 128 |
"Enable support for the Unicode UTF-8 encoding.") |
"Enable support for the Unicode UTF-8 encoding.") |
| 129 |
|
|
| 130 |
|
SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL |
| 131 |
|
"ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks") |
| 132 |
|
|
| 133 |
|
OPTION(PCRE_SHOW_REPORT "Show the final configuration report" ON) |
| 134 |
|
OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON) |
| 135 |
|
OPTION(PCRE_BUILD_TESTS "Build the tests" ON) |
| 136 |
|
|
| 137 |
|
IF (PCRE_BUILD_TESTS) |
| 138 |
|
IF (NOT PCRE_BUILD_PCREGREP) |
| 139 |
|
MESSAGE(STATUS "** Building tests requires pcregrep: PCRE_BUILD_PCREGREP forced ON") |
| 140 |
|
SET(PCRE_BUILD_PCREGREP ON) |
| 141 |
|
ENDIF(NOT PCRE_BUILD_PCREGREP) |
| 142 |
|
ENDIF(PCRE_BUILD_TESTS) |
| 143 |
|
|
| 144 |
|
IF (MINGW) |
| 145 |
|
OPTION(NON_STANDARD_LIB_PREFIX |
| 146 |
|
"ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc." |
| 147 |
|
OFF) |
| 148 |
|
|
| 149 |
|
OPTION(NON_STANDARD_LIB_SUFFIX |
| 150 |
|
"ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc." |
| 151 |
|
OFF) |
| 152 |
|
ENDIF(MINGW) |
| 153 |
|
|
| 154 |
|
# bzip2 lib |
| 155 |
|
IF(BZIP2_FOUND) |
| 156 |
|
OPTION (PCRE_SUPPORT_LIBBZ2 "Enable support for linking pcregrep with libbz2." ON) |
| 157 |
|
ENDIF(BZIP2_FOUND) |
| 158 |
|
IF(PCRE_SUPPORT_LIBBZ2) |
| 159 |
|
INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) |
| 160 |
|
ENDIF(PCRE_SUPPORT_LIBBZ2) |
| 161 |
|
|
| 162 |
|
# zlib |
| 163 |
|
IF(ZLIB_FOUND) |
| 164 |
|
OPTION (PCRE_SUPPORT_LIBZ "Enable support for linking pcregrep with libz." ON) |
| 165 |
|
ENDIF(ZLIB_FOUND) |
| 166 |
|
IF(PCRE_SUPPORT_LIBZ) |
| 167 |
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) |
| 168 |
|
ENDIF(PCRE_SUPPORT_LIBZ) |
| 169 |
|
|
| 170 |
|
# readline lib |
| 171 |
|
IF(READLINE_FOUND) |
| 172 |
|
OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON) |
| 173 |
|
ENDIF(READLINE_FOUND) |
| 174 |
|
IF(PCRE_SUPPORT_LIBREADLINE) |
| 175 |
|
INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR}) |
| 176 |
|
ENDIF(PCRE_SUPPORT_LIBREADLINE) |
| 177 |
|
|
| 178 |
# Prepare build configuration |
# Prepare build configuration |
| 179 |
|
|
| 180 |
SET(pcre_have_type_traits 0) |
SET(pcre_have_type_traits 0) |
| 181 |
SET(pcre_have_bits_type_traits 0) |
SET(pcre_have_bits_type_traits 0) |
| 182 |
|
|
| 183 |
IF(HAVE_TYPE_TRAITS_H) |
IF(HAVE_TYPE_TRAITS_H) |
| 184 |
SET(pcre_have_type_traits 1) |
SET(pcre_have_type_traits 1) |
| 185 |
ENDIF(HAVE_TYPE_TRAITS_H) |
ENDIF(HAVE_TYPE_TRAITS_H) |
| 186 |
|
|
| 187 |
IF(HAVE_BITS_TYPE_TRAITS_H) |
IF(HAVE_BITS_TYPE_TRAITS_H) |
| 188 |
SET(pcre_have_bits_type_traits 1) |
SET(pcre_have_bits_type_traits 1) |
| 189 |
ENDIF(HAVE_BITS_TYPE_TRAITS_H) |
ENDIF(HAVE_BITS_TYPE_TRAITS_H) |
| 190 |
|
|
| 191 |
SET(pcre_have_long_long 0) |
SET(pcre_have_long_long 0) |
| 192 |
SET(pcre_have_ulong_long 0) |
SET(pcre_have_ulong_long 0) |
| 193 |
|
|
| 194 |
IF(HAVE_LONG_LONG) |
IF(HAVE_LONG_LONG) |
| 195 |
SET(pcre_have_long_long 1) |
SET(pcre_have_long_long 1) |
| 196 |
ENDIF(HAVE_LONG_LONG) |
ENDIF(HAVE_LONG_LONG) |
| 197 |
|
|
| 198 |
IF(HAVE_UNSIGNED_LONG_LONG) |
IF(HAVE_UNSIGNED_LONG_LONG) |
| 199 |
SET(pcre_have_ulong_long 1) |
SET(pcre_have_ulong_long 1) |
| 200 |
ENDIF(HAVE_UNSIGNED_LONG_LONG) |
ENDIF(HAVE_UNSIGNED_LONG_LONG) |
| 201 |
|
|
| 202 |
IF(NOT BUILD_SHARED_LIBS) |
IF(NOT BUILD_SHARED_LIBS) |
| 203 |
SET(PCRE_STATIC 1) |
SET(PCRE_STATIC 1) |
| 204 |
ENDIF(NOT BUILD_SHARED_LIBS) |
ENDIF(NOT BUILD_SHARED_LIBS) |
| 205 |
|
|
| 206 |
|
IF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 207 |
|
SET(BSR_ANYCRLF 1) |
| 208 |
|
ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 209 |
|
|
| 210 |
IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 211 |
SET(SUPPORT_UTF8 1) |
SET(SUPPORT_UTF8 1) |
| 212 |
ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 213 |
|
|
| 214 |
IF(PCRE_SUPPORT_UNICODE_PROPERTIES) |
IF(PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 215 |
SET(SUPPORT_UCP 1) |
SET(SUPPORT_UCP 1) |
| 216 |
ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES) |
ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 217 |
|
|
| 218 |
|
IF(PCRE_SUPPORT_JIT) |
| 219 |
|
SET(SUPPORT_JIT 1) |
| 220 |
|
ENDIF(PCRE_SUPPORT_JIT) |
| 221 |
|
|
| 222 |
|
IF(PCRE_SUPPORT_PCREGREP_JIT) |
| 223 |
|
SET(SUPPORT_PCREGREP_JIT 1) |
| 224 |
|
ENDIF(PCRE_SUPPORT_PCREGREP_JIT) |
| 225 |
|
|
| 226 |
|
# This next one used to contain |
| 227 |
|
# SET(PCRETEST_LIBS ${READLINE_LIBRARY}) |
| 228 |
|
# but I was advised to add the NCURSES test as well, along with |
| 229 |
|
# some modifications to cmake/FindReadline.cmake which should |
| 230 |
|
# make it possible to override the default if necessary. PH |
| 231 |
|
|
| 232 |
|
IF(PCRE_SUPPORT_LIBREADLINE) |
| 233 |
|
SET(SUPPORT_LIBREADLINE 1) |
| 234 |
|
SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY}) |
| 235 |
|
ENDIF(PCRE_SUPPORT_LIBREADLINE) |
| 236 |
|
|
| 237 |
|
IF(PCRE_SUPPORT_LIBZ) |
| 238 |
|
SET(SUPPORT_LIBZ 1) |
| 239 |
|
SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES}) |
| 240 |
|
ENDIF(PCRE_SUPPORT_LIBZ) |
| 241 |
|
|
| 242 |
|
IF(PCRE_SUPPORT_LIBBZ2) |
| 243 |
|
SET(SUPPORT_LIBBZ2 1) |
| 244 |
|
SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${BZIP2_LIBRARIES}) |
| 245 |
|
ENDIF(PCRE_SUPPORT_LIBBZ2) |
| 246 |
|
|
| 247 |
SET(NEWLINE "") |
SET(NEWLINE "") |
| 248 |
|
|
| 249 |
IF(PCRE_NEWLINE STREQUAL "LF") |
IF(PCRE_NEWLINE STREQUAL "LF") |
| 250 |
SET(NEWLINE "10") |
SET(NEWLINE "10") |
| 251 |
ENDIF(PCRE_NEWLINE STREQUAL "LF") |
ENDIF(PCRE_NEWLINE STREQUAL "LF") |
| 252 |
IF(PCRE_NEWLINE STREQUAL "CR") |
IF(PCRE_NEWLINE STREQUAL "CR") |
| 253 |
SET(NEWLINE "13") |
SET(NEWLINE "13") |
| 254 |
ENDIF(PCRE_NEWLINE STREQUAL "CR") |
ENDIF(PCRE_NEWLINE STREQUAL "CR") |
| 255 |
IF(PCRE_NEWLINE STREQUAL "CRLF") |
IF(PCRE_NEWLINE STREQUAL "CRLF") |
| 256 |
SET(NEWLINE "3338") |
SET(NEWLINE "3338") |
| 257 |
ENDIF(PCRE_NEWLINE STREQUAL "CRLF") |
ENDIF(PCRE_NEWLINE STREQUAL "CRLF") |
| 258 |
IF(PCRE_NEWLINE STREQUAL "ANY") |
IF(PCRE_NEWLINE STREQUAL "ANY") |
| 259 |
SET(NEWLINE "-1") |
SET(NEWLINE "-1") |
| 260 |
ENDIF(PCRE_NEWLINE STREQUAL "ANY") |
ENDIF(PCRE_NEWLINE STREQUAL "ANY") |
| 261 |
|
IF(PCRE_NEWLINE STREQUAL "ANYCRLF") |
| 262 |
|
SET(NEWLINE "-2") |
| 263 |
|
ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF") |
| 264 |
|
|
| 265 |
IF(NEWLINE STREQUAL "") |
IF(NEWLINE STREQUAL "") |
| 266 |
MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\".") |
MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".") |
| 267 |
ENDIF(NEWLINE STREQUAL "") |
ENDIF(NEWLINE STREQUAL "") |
| 268 |
|
|
| 269 |
IF(PCRE_EBCDIC) |
IF(PCRE_EBCDIC) |
| 270 |
SET(EBCDIC 1) |
SET(EBCDIC 1) |
| 271 |
ENDIF(PCRE_EBCDIC) |
ENDIF(PCRE_EBCDIC) |
| 272 |
|
|
| 273 |
IF(PCRE_NO_RECURSE) |
IF(PCRE_NO_RECURSE) |
| 274 |
SET(NO_RECURSE 1) |
SET(NO_RECURSE 1) |
| 275 |
ENDIF(PCRE_NO_RECURSE) |
ENDIF(PCRE_NO_RECURSE) |
| 276 |
|
|
| 277 |
# Output files |
# Output files |
|
|
|
| 278 |
CONFIGURE_FILE(config-cmake.h.in |
CONFIGURE_FILE(config-cmake.h.in |
| 279 |
${CMAKE_BINARY_DIR}/config.h |
${PROJECT_BINARY_DIR}/config.h |
| 280 |
@ONLY) |
@ONLY) |
| 281 |
|
|
| 282 |
CONFIGURE_FILE(pcre.h.generic |
CONFIGURE_FILE(pcre.h.generic |
| 283 |
${CMAKE_BINARY_DIR}/pcre.h |
${PROJECT_BINARY_DIR}/pcre.h |
| 284 |
COPYONLY) |
COPYONLY) |
| 285 |
|
|
| 286 |
# What about pcre-config and libpcre.pc? |
# What about pcre-config and libpcre.pc? |
| 287 |
|
|
| 288 |
IF(PCRE_BUILD_PCRECPP) |
IF(PCRE_BUILD_PCRECPP) |
| 289 |
CONFIGURE_FILE(pcre_stringpiece.h.in |
CONFIGURE_FILE(pcre_stringpiece.h.in |
| 290 |
${CMAKE_BINARY_DIR}/pcre_stringpiece.h |
${PROJECT_BINARY_DIR}/pcre_stringpiece.h |
| 291 |
@ONLY) |
@ONLY) |
| 292 |
|
|
| 293 |
CONFIGURE_FILE(pcrecpparg.h.in |
CONFIGURE_FILE(pcrecpparg.h.in |
| 294 |
${CMAKE_BINARY_DIR}/pcrecpparg.h |
${PROJECT_BINARY_DIR}/pcrecpparg.h |
| 295 |
@ONLY) |
@ONLY) |
| 296 |
ENDIF(PCRE_BUILD_PCRECPP) |
ENDIF(PCRE_BUILD_PCRECPP) |
| 297 |
|
|
| 298 |
# Character table generation |
# Character table generation |
| 299 |
|
|
| 300 |
ADD_EXECUTABLE(dftables dftables.c) |
OPTION(PCRE_REBUILD_CHARTABLES "Rebuild char tables" OFF) |
| 301 |
|
IF(PCRE_REBUILD_CHARTABLES) |
| 302 |
GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) |
ADD_EXECUTABLE(dftables dftables.c) |
| 303 |
|
|
| 304 |
ADD_CUSTOM_COMMAND( |
GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) |
| 305 |
COMMENT "Generating character tables (pcre_chartables.c) for current locale" |
|
| 306 |
DEPENDS dftables |
ADD_CUSTOM_COMMAND( |
| 307 |
COMMAND ${DFTABLES_EXE} |
COMMENT "Generating character tables (pcre_chartables.c) for current locale" |
| 308 |
ARGS ${CMAKE_BINARY_DIR}/pcre_chartables.c |
DEPENDS dftables |
| 309 |
OUTPUT ${CMAKE_BINARY_DIR}/pcre_chartables.c |
COMMAND ${DFTABLES_EXE} |
| 310 |
) |
ARGS ${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 311 |
|
OUTPUT ${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 312 |
|
) |
| 313 |
|
ELSE(PCRE_REBUILD_CHARTABLES) |
| 314 |
|
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/pcre_chartables.c.dist |
| 315 |
|
${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 316 |
|
COPYONLY) |
| 317 |
|
ENDIF(PCRE_REBUILD_CHARTABLES) |
| 318 |
|
|
| 319 |
# Source code |
# Source code |
| 320 |
|
|
| 321 |
SET(PCRE_HEADERS ${CMAKE_BINARY_DIR}/pcre.h) |
SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/pcre.h) |
| 322 |
|
|
| 323 |
SET(PCRE_SOURCES |
SET(PCRE_SOURCES |
| 324 |
${CMAKE_BINARY_DIR}/pcre_chartables.c |
${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 325 |
pcre_compile.c |
pcre_compile.c |
| 326 |
pcre_config.c |
pcre_config.c |
| 327 |
pcre_dfa_exec.c |
pcre_dfa_exec.c |
| 328 |
pcre_exec.c |
pcre_exec.c |
| 329 |
pcre_fullinfo.c |
pcre_fullinfo.c |
| 330 |
pcre_get.c |
pcre_get.c |
| 331 |
pcre_globals.c |
pcre_globals.c |
| 332 |
pcre_info.c |
pcre_info.c |
| 333 |
pcre_newline.c |
pcre_jit_compile.c |
| 334 |
pcre_maketables.c |
pcre_newline.c |
| 335 |
pcre_ord2utf8.c |
pcre_maketables.c |
| 336 |
pcre_refcount.c |
pcre_ord2utf8.c |
| 337 |
pcre_study.c |
pcre_refcount.c |
| 338 |
pcre_tables.c |
pcre_study.c |
| 339 |
pcre_try_flipped.c |
pcre_tables.c |
| 340 |
pcre_ucp_searchfuncs.c |
pcre_try_flipped.c |
| 341 |
pcre_valid_utf8.c |
pcre_ucd.c |
| 342 |
pcre_version.c |
pcre_valid_utf8.c |
| 343 |
pcre_xclass.c |
pcre_version.c |
| 344 |
|
pcre_xclass.c |
| 345 |
) |
) |
| 346 |
|
|
| 347 |
SET(PCREPOSIX_HEADERS pcreposix.h) |
SET(PCREPOSIX_HEADERS pcreposix.h) |
| 349 |
SET(PCREPOSIX_SOURCES pcreposix.c) |
SET(PCREPOSIX_SOURCES pcreposix.c) |
| 350 |
|
|
| 351 |
SET(PCRECPP_HEADERS |
SET(PCRECPP_HEADERS |
| 352 |
pcrecpp.h |
pcrecpp.h |
| 353 |
pcre_scanner.h |
pcre_scanner.h |
| 354 |
${CMAKE_BINARY_DIR}/pcrecpparg.h |
${PROJECT_BINARY_DIR}/pcrecpparg.h |
| 355 |
${CMAKE_BINARY_DIR}/pcre_stringpiece.h |
${PROJECT_BINARY_DIR}/pcre_stringpiece.h |
| 356 |
) |
) |
| 357 |
|
|
| 358 |
SET(PCRECPP_SOURCES |
SET(PCRECPP_SOURCES |
| 359 |
pcrecpp.cc |
pcrecpp.cc |
| 360 |
pcre_scanner.cc |
pcre_scanner.cc |
| 361 |
pcre_stringpiece.cc |
pcre_stringpiece.cc |
| 362 |
) |
) |
| 363 |
|
|
| 364 |
# Build setup |
# Build setup |
| 365 |
|
|
| 366 |
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
| 367 |
|
|
| 368 |
IF(WIN32) |
IF(MSVC) |
| 369 |
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) |
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) |
| 370 |
ENDIF(WIN32) |
ENDIF(MSVC) |
| 371 |
|
|
| 372 |
SET(CMAKE_INCLUDE_CURRENT_DIR 1) |
SET(CMAKE_INCLUDE_CURRENT_DIR 1) |
| 373 |
|
# needed to make sure to not link debug libs |
| 374 |
|
# against release libs and vice versa |
| 375 |
|
IF(WIN32) |
| 376 |
|
SET(CMAKE_DEBUG_POSTFIX "d") |
| 377 |
|
ENDIF(WIN32) |
| 378 |
|
|
| 379 |
#SET(CMAKE_DEBUG_POSTFIX "d") |
SET(targets) |
| 380 |
|
|
| 381 |
# Libraries |
# Libraries |
| 382 |
|
# pcre |
| 383 |
ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES}) |
ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${PROJECT_BINARY_DIR}/config.h) |
| 384 |
|
SET(targets ${targets} pcre) |
| 385 |
ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) |
ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) |
| 386 |
|
SET(targets ${targets} pcreposix) |
| 387 |
TARGET_LINK_LIBRARIES(pcreposix pcre) |
TARGET_LINK_LIBRARIES(pcreposix pcre) |
| 388 |
|
IF(MINGW AND NOT PCRE_STATIC) |
| 389 |
|
IF(NON_STANDARD_LIB_PREFIX) |
| 390 |
|
SET_TARGET_PROPERTIES(pcre pcreposix |
| 391 |
|
PROPERTIES PREFIX "" |
| 392 |
|
) |
| 393 |
|
ENDIF(NON_STANDARD_LIB_PREFIX) |
| 394 |
|
|
| 395 |
|
IF(NON_STANDARD_LIB_SUFFIX) |
| 396 |
|
SET_TARGET_PROPERTIES(pcre pcreposix |
| 397 |
|
PROPERTIES SUFFIX "-0.dll" |
| 398 |
|
) |
| 399 |
|
ENDIF(NON_STANDARD_LIB_SUFFIX) |
| 400 |
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 401 |
|
|
| 402 |
|
|
| 403 |
|
# pcrecpp |
| 404 |
IF(PCRE_BUILD_PCRECPP) |
IF(PCRE_BUILD_PCRECPP) |
| 405 |
ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) |
ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) |
| 406 |
TARGET_LINK_LIBRARIES(pcrecpp pcre) |
SET(targets ${targets} pcrecpp) |
| 407 |
IF(MINGW) |
TARGET_LINK_LIBRARIES(pcrecpp pcre) |
| 408 |
SET_TARGET_PROPERTIES(pcrecpp PROPERTIES PREFIX "mingw-") |
|
| 409 |
ENDIF(MINGW) |
IF(MINGW AND NOT PCRE_STATIC) |
| 410 |
|
IF(NON_STANDARD_LIB_PREFIX) |
| 411 |
|
SET_TARGET_PROPERTIES(pcrecpp |
| 412 |
|
PROPERTIES PREFIX "" |
| 413 |
|
) |
| 414 |
|
ENDIF(NON_STANDARD_LIB_PREFIX) |
| 415 |
|
|
| 416 |
|
IF(NON_STANDARD_LIB_SUFFIX) |
| 417 |
|
SET_TARGET_PROPERTIES(pcrecpp |
| 418 |
|
PROPERTIES SUFFIX "-0.dll" |
| 419 |
|
) |
| 420 |
|
ENDIF(NON_STANDARD_LIB_SUFFIX) |
| 421 |
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 422 |
ENDIF(PCRE_BUILD_PCRECPP) |
ENDIF(PCRE_BUILD_PCRECPP) |
| 423 |
|
|
|
# Executables |
|
|
|
|
|
ADD_EXECUTABLE(pcretest pcretest.c) |
|
|
TARGET_LINK_LIBRARIES(pcretest pcreposix) |
|
| 424 |
|
|
| 425 |
ADD_EXECUTABLE(pcregrep pcregrep.c) |
# Executables |
|
TARGET_LINK_LIBRARIES(pcregrep pcreposix) |
|
|
|
|
|
IF(PCRE_BUILD_PCRECPP) |
|
|
ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc) |
|
|
TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp) |
|
| 426 |
|
|
| 427 |
ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc) |
# Removed by PH (2008-01-23) because pcredemo shouldn't really be built |
| 428 |
TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp) |
# automatically, and it gave trouble in some environments anyway. |
| 429 |
|
# ADD_EXECUTABLE(pcredemo pcredemo.c) |
| 430 |
|
# TARGET_LINK_LIBRARIES(pcredemo pcreposix) |
| 431 |
|
# IF(NOT BUILD_SHARED_LIBS) |
| 432 |
|
# # make sure to not use declspec(dllimport) in static mode on windows |
| 433 |
|
# SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC") |
| 434 |
|
# ENDIF(NOT BUILD_SHARED_LIBS) |
| 435 |
|
|
| 436 |
|
IF(PCRE_BUILD_PCREGREP) |
| 437 |
|
ADD_EXECUTABLE(pcregrep pcregrep.c) |
| 438 |
|
SET(targets ${targets} pcregrep) |
| 439 |
|
TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS}) |
| 440 |
|
ENDIF(PCRE_BUILD_PCREGREP) |
| 441 |
|
|
|
ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc) |
|
|
TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp) |
|
|
ENDIF(PCRE_BUILD_PCRECPP) |
|
| 442 |
|
|
| 443 |
# Testing |
# Testing |
| 444 |
|
IF(PCRE_BUILD_TESTS) |
| 445 |
|
ENABLE_TESTING() |
| 446 |
|
|
| 447 |
ENABLE_TESTING() |
ADD_EXECUTABLE(pcretest pcretest.c) |
| 448 |
|
SET(targets ${targets} pcretest) |
| 449 |
GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION) |
TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS}) |
| 450 |
GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION) |
|
| 451 |
|
IF(PCRE_SUPPORT_JIT AND PCRE_SUPPORT_UTF8) |
| 452 |
# Write out a CTest configuration file that sets some needed environment |
ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c) |
| 453 |
# variables for the test scripts. |
SET(targets ${targets} pcre_jit_test) |
| 454 |
# |
TARGET_LINK_LIBRARIES(pcre_jit_test pcre) |
| 455 |
FILE(WRITE ${CMAKE_BINARY_DIR}/CTestCustom.ctest |
ENDIF(PCRE_SUPPORT_JIT AND PCRE_SUPPORT_UTF8) |
| 456 |
"# This is a generated file. |
|
| 457 |
SET(ENV{srcdir} ${CMAKE_SOURCE_DIR}) |
IF(PCRE_BUILD_PCRECPP) |
| 458 |
SET(ENV{pcregrep} ${PCREGREP_EXE}) |
ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc) |
| 459 |
SET(ENV{pcretest} ${PCRETEST_EXE}) |
SET(targets ${targets} pcrecpp_unittest) |
| 460 |
") |
TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp) |
| 461 |
|
IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC) |
| 462 |
IF(UNIX) |
SET_TARGET_PROPERTIES(pcrecpp |
| 463 |
ADD_TEST(pcre_test ${CMAKE_SOURCE_DIR}/RunTest) |
PROPERTIES PREFIX "" |
| 464 |
ADD_TEST(pcre_grep_test ${CMAKE_SOURCE_DIR}/RunGrepTest) |
) |
| 465 |
ENDIF(UNIX) |
ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC) |
| 466 |
IF(WIN32) |
|
| 467 |
ADD_TEST(pcre_test cmd /C ${CMAKE_SOURCE_DIR}/RunTest.bat) |
ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc) |
| 468 |
ENDIF(WIN32) |
SET(targets ${targets} pcre_scanner_unittest) |
| 469 |
|
TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp) |
| 470 |
GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE |
|
| 471 |
pcrecpp_unittest |
ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc) |
| 472 |
DEBUG_LOCATION) |
SET(targets ${targets} pcre_stringpiece_unittest) |
| 473 |
|
TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp) |
| 474 |
GET_TARGET_PROPERTY(PCRE_SCANNER_UNITTEST_EXE |
ENDIF(PCRE_BUILD_PCRECPP) |
| 475 |
pcre_scanner_unittest |
|
| 476 |
DEBUG_LOCATION) |
GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION) |
| 477 |
|
GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION) |
| 478 |
GET_TARGET_PROPERTY(PCRE_STRINGPIECE_UNITTEST_EXE |
|
| 479 |
pcre_stringpiece_unittest |
# Write out a CTest configuration file that sets some needed environment |
| 480 |
DEBUG_LOCATION) |
# variables for the test scripts. |
| 481 |
|
# |
| 482 |
ADD_TEST(pcrecpp_test ${PCRECPP_UNITTEST_EXE}) |
FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest |
| 483 |
ADD_TEST(pcre_scanner_test ${PCRE_SCANNER_UNITTEST_EXE}) |
"# This is a generated file. |
| 484 |
ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE}) |
SET(ENV{srcdir} ${PROJECT_SOURCE_DIR}) |
| 485 |
|
SET(ENV{pcregrep} ${PCREGREP_EXE}) |
| 486 |
|
SET(ENV{pcretest} ${PCRETEST_EXE}) |
| 487 |
|
") |
| 488 |
|
|
| 489 |
|
IF(UNIX) |
| 490 |
|
ADD_TEST(pcre_test ${PROJECT_SOURCE_DIR}/RunTest) |
| 491 |
|
ADD_TEST(pcre_grep_test ${PROJECT_SOURCE_DIR}/RunGrepTest) |
| 492 |
|
ENDIF(UNIX) |
| 493 |
|
IF(WIN32) |
| 494 |
|
# ADD_TEST(pcre_test cmd /C ${PROJECT_SOURCE_DIR}/RunTest.bat) |
| 495 |
|
ADD_TEST(pcre_test ${PROJECT_SOURCE_DIR}/RunTest.bat) |
| 496 |
|
ENDIF(WIN32) |
| 497 |
|
|
| 498 |
|
IF(PCRE_SUPPORT_JIT AND PCRE_SUPPORT_UTF8) |
| 499 |
|
GET_TARGET_PROPERTY(PCRE_JIT_TEST_EXE |
| 500 |
|
pcre_jit_test |
| 501 |
|
DEBUG_LOCATION) |
| 502 |
|
ENDIF(PCRE_SUPPORT_JIT AND PCRE_SUPPORT_UTF8) |
| 503 |
|
|
| 504 |
|
GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE |
| 505 |
|
pcrecpp_unittest |
| 506 |
|
DEBUG_LOCATION) |
| 507 |
|
|
| 508 |
|
GET_TARGET_PROPERTY(PCRE_SCANNER_UNITTEST_EXE |
| 509 |
|
pcre_scanner_unittest |
| 510 |
|
DEBUG_LOCATION) |
| 511 |
|
|
| 512 |
|
GET_TARGET_PROPERTY(PCRE_STRINGPIECE_UNITTEST_EXE |
| 513 |
|
pcre_stringpiece_unittest |
| 514 |
|
DEBUG_LOCATION) |
| 515 |
|
|
| 516 |
|
IF(PCRE_SUPPORT_JIT AND PCRE_SUPPORT_UTF8) |
| 517 |
|
ADD_TEST(pcre_jit_test ${PCRE_JIT_TEST_EXE}) |
| 518 |
|
ENDIF(PCRE_SUPPORT_JIT AND PCRE_SUPPORT_UTF8) |
| 519 |
|
ADD_TEST(pcrecpp_test ${PCRECPP_UNITTEST_EXE}) |
| 520 |
|
ADD_TEST(pcre_scanner_test ${PCRE_SCANNER_UNITTEST_EXE}) |
| 521 |
|
ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE}) |
| 522 |
|
ENDIF(PCRE_BUILD_TESTS) |
| 523 |
|
|
| 524 |
# Installation |
# Installation |
|
|
|
| 525 |
SET(CMAKE_INSTALL_ALWAYS 1) |
SET(CMAKE_INSTALL_ALWAYS 1) |
| 526 |
|
|
| 527 |
INSTALL(TARGETS pcre pcreposix pcregrep pcretest |
INSTALL(TARGETS ${targets} |
| 528 |
RUNTIME DESTINATION bin |
RUNTIME DESTINATION bin |
| 529 |
LIBRARY DESTINATION lib |
LIBRARY DESTINATION lib |
| 530 |
ARCHIVE DESTINATION lib) |
ARCHIVE DESTINATION lib) |
| 531 |
|
|
| 532 |
INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include) |
INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include) |
| 533 |
|
|
| 534 |
FILE(GLOB html ${CMAKE_SOURCE_DIR}/doc/html/*.html) |
FILE(GLOB html ${PROJECT_SOURCE_DIR}/doc/html/*.html) |
| 535 |
FILE(GLOB man1 ${CMAKE_SOURCE_DIR}/doc/*.1) |
FILE(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1) |
| 536 |
FILE(GLOB man3 ${CMAKE_SOURCE_DIR}/doc/*.3) |
FILE(GLOB man3 ${PROJECT_SOURCE_DIR}/doc/*.3) |
| 537 |
|
|
| 538 |
IF(PCRE_BUILD_PCRECPP) |
IF(PCRE_BUILD_PCRECPP) |
| 539 |
INSTALL(TARGETS pcrecpp |
INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) |
|
RUNTIME DESTINATION bin |
|
|
LIBRARY DESTINATION lib |
|
|
ARCHIVE DESTINATION lib) |
|
|
INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) |
|
| 540 |
ELSE(PCRE_BUILD_PCRECPP) |
ELSE(PCRE_BUILD_PCRECPP) |
| 541 |
# Remove pcrecpp.3 |
# Remove pcrecpp.3 |
| 542 |
FOREACH(man ${man3}) |
FOREACH(man ${man3}) |
| 543 |
GET_FILENAME_COMPONENT(man_tmp ${man} NAME) |
GET_FILENAME_COMPONENT(man_tmp ${man} NAME) |
| 544 |
IF(NOT man_tmp STREQUAL "pcrecpp.3") |
IF(NOT man_tmp STREQUAL "pcrecpp.3") |
| 545 |
SET(man3_new ${man3} ${man}) |
SET(man3_new ${man3} ${man}) |
| 546 |
ENDIF(NOT man_tmp STREQUAL "pcrecpp.3") |
ENDIF(NOT man_tmp STREQUAL "pcrecpp.3") |
| 547 |
ENDFOREACH(man ${man3}) |
ENDFOREACH(man ${man3}) |
| 548 |
SET(man3 ${man3_new}) |
SET(man3 ${man3_new}) |
| 549 |
ENDIF(PCRE_BUILD_PCRECPP) |
ENDIF(PCRE_BUILD_PCRECPP) |
| 550 |
|
|
| 551 |
|
|
| 552 |
INSTALL(FILES ${man1} DESTINATION man/man1) |
INSTALL(FILES ${man1} DESTINATION man/man1) |
| 553 |
INSTALL(FILES ${man3} DESTINATION man/man3) |
INSTALL(FILES ${man3} DESTINATION man/man3) |
| 554 |
INSTALL(FILES ${html} DESTINATION share/doc/pcre/html) |
INSTALL(FILES ${html} DESTINATION share/doc/pcre/html) |
| 555 |
|
|
| 556 |
|
# help, only for nice output |
| 557 |
|
IF(BUILD_SHARED_LIBS) |
| 558 |
|
SET(BUILD_STATIC_LIBS OFF) |
| 559 |
|
ELSE(BUILD_SHARED_LIBS) |
| 560 |
|
SET(BUILD_STATIC_LIBS ON) |
| 561 |
|
ENDIF(BUILD_SHARED_LIBS) |
| 562 |
|
|
| 563 |
|
IF(PCRE_SHOW_REPORT) |
| 564 |
|
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) |
| 565 |
|
IF (CMAKE_C_FLAGS) |
| 566 |
|
SET(cfsp " ") |
| 567 |
|
ENDIF(CMAKE_C_FLAGS) |
| 568 |
|
IF (CMAKE_CXX_FLAGS) |
| 569 |
|
SET(cxxfsp " ") |
| 570 |
|
ENDIF(CMAKE_CXX_FLAGS) |
| 571 |
|
MESSAGE(STATUS "") |
| 572 |
|
MESSAGE(STATUS "") |
| 573 |
|
MESSAGE(STATUS "PCRE configuration summary:") |
| 574 |
|
MESSAGE(STATUS "") |
| 575 |
|
MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") |
| 576 |
|
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") |
| 577 |
|
MESSAGE(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}") |
| 578 |
|
MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}") |
| 579 |
|
MESSAGE(STATUS " C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}${cxxfsp}${CMAKE_CXX_FLAGS_${buildtype}}") |
| 580 |
|
MESSAGE(STATUS "") |
| 581 |
|
MESSAGE(STATUS " Build C++ library ............... : ${PCRE_BUILD_PCRECPP}") |
| 582 |
|
MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}") |
| 583 |
|
MESSAGE(STATUS " Enable UTF-8 support ............ : ${PCRE_SUPPORT_UNICODE_PROPERTIES}") |
| 584 |
|
MESSAGE(STATUS " Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}") |
| 585 |
|
MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE_NEWLINE}") |
| 586 |
|
MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}") |
| 587 |
|
MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE_EBCDIC}") |
| 588 |
|
MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}") |
| 589 |
|
MESSAGE(STATUS " No stack recursion .............. : ${PCRE_NO_RECURSE}") |
| 590 |
|
MESSAGE(STATUS " POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}") |
| 591 |
|
MESSAGE(STATUS " Internal link size .............. : ${PCRE_LINK_SIZE}") |
| 592 |
|
MESSAGE(STATUS " Match limit ..................... : ${PCRE_MATCH_LIMIT}") |
| 593 |
|
MESSAGE(STATUS " Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}") |
| 594 |
|
MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}") |
| 595 |
|
MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}") |
| 596 |
|
MESSAGE(STATUS " Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}") |
| 597 |
|
MESSAGE(STATUS " Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}") |
| 598 |
|
MESSAGE(STATUS " Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}") |
| 599 |
|
MESSAGE(STATUS " Build tests (implies pcretest) .. : ${PCRE_BUILD_TESTS}") |
| 600 |
|
IF(ZLIB_FOUND) |
| 601 |
|
MESSAGE(STATUS " Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}") |
| 602 |
|
ELSE(ZLIB_FOUND) |
| 603 |
|
MESSAGE(STATUS " Link pcregrep with libz ......... : None" ) |
| 604 |
|
ENDIF(ZLIB_FOUND) |
| 605 |
|
IF(BZIP2_FOUND) |
| 606 |
|
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}") |
| 607 |
|
ELSE(BZIP2_FOUND) |
| 608 |
|
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : None" ) |
| 609 |
|
ENDIF(BZIP2_FOUND) |
| 610 |
|
IF(NOT PCRE_SUPPORT_LIBREADLINE) |
| 611 |
|
MESSAGE(STATUS " Link pcretest with libreadline .. : None" ) |
| 612 |
|
ELSE(NOT PCRE_SUPPORT_LIBREADLINE) |
| 613 |
|
MESSAGE(STATUS " Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}") |
| 614 |
|
ENDIF(NOT PCRE_SUPPORT_LIBREADLINE) |
| 615 |
|
IF(MINGW AND NOT PCRE_STATIC) |
| 616 |
|
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}") |
| 617 |
|
MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}") |
| 618 |
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 619 |
|
MESSAGE(STATUS "") |
| 620 |
|
ENDIF(PCRE_SHOW_REPORT) |
| 621 |
|
|
| 622 |
# end CMakeLists.txt |
# end CMakeLists.txt |