| 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 |
# |
# |
| 12 |
|
|
| 13 |
PROJECT(PCRE C CXX) |
PROJECT(PCRE C CXX) |
| 59 |
"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.") |
| 60 |
|
|
| 61 |
SET(PCRE_NEWLINE "LF" CACHE STRING |
SET(PCRE_NEWLINE "LF" CACHE STRING |
| 62 |
"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).") |
| 63 |
|
|
| 64 |
SET(PCRE_NO_RECURSE OFF CACHE BOOL |
SET(PCRE_NO_RECURSE OFF CACHE BOOL |
| 65 |
"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.") |
| 73 |
SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL |
SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL |
| 74 |
"Enable support for the Unicode UTF-8 encoding.") |
"Enable support for the Unicode UTF-8 encoding.") |
| 75 |
|
|
| 76 |
|
SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL |
| 77 |
|
"ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks") |
| 78 |
|
|
| 79 |
# Prepare build configuration |
# Prepare build configuration |
| 80 |
|
|
| 81 |
SET(pcre_have_type_traits 0) |
SET(pcre_have_type_traits 0) |
| 104 |
SET(PCRE_STATIC 1) |
SET(PCRE_STATIC 1) |
| 105 |
ENDIF(NOT BUILD_SHARED_LIBS) |
ENDIF(NOT BUILD_SHARED_LIBS) |
| 106 |
|
|
| 107 |
|
IF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 108 |
|
SET(BSR_ANYCRLF 1) |
| 109 |
|
ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 110 |
|
|
| 111 |
IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 112 |
SET(SUPPORT_UTF8 1) |
SET(SUPPORT_UTF8 1) |
| 113 |
ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 130 |
IF(PCRE_NEWLINE STREQUAL "ANY") |
IF(PCRE_NEWLINE STREQUAL "ANY") |
| 131 |
SET(NEWLINE "-1") |
SET(NEWLINE "-1") |
| 132 |
ENDIF(PCRE_NEWLINE STREQUAL "ANY") |
ENDIF(PCRE_NEWLINE STREQUAL "ANY") |
| 133 |
|
IF(PCRE_NEWLINE STREQUAL "ANYCRLF") |
| 134 |
|
SET(NEWLINE "-2") |
| 135 |
|
ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF") |
| 136 |
|
|
| 137 |
IF(NEWLINE STREQUAL "") |
IF(NEWLINE STREQUAL "") |
| 138 |
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\".") |
| 139 |
ENDIF(NEWLINE STREQUAL "") |
ENDIF(NEWLINE STREQUAL "") |
| 140 |
|
|
| 141 |
IF(PCRE_EBCDIC) |
IF(PCRE_EBCDIC) |
| 245 |
ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) |
ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) |
| 246 |
TARGET_LINK_LIBRARIES(pcreposix pcre) |
TARGET_LINK_LIBRARIES(pcreposix pcre) |
| 247 |
|
|
| 248 |
|
SET_TARGET_PROPERTIES(pcre pcreposix |
| 249 |
|
PROPERTIES PREFIX "" |
| 250 |
|
) |
| 251 |
|
|
| 252 |
IF(PCRE_BUILD_PCRECPP) |
IF(PCRE_BUILD_PCRECPP) |
| 253 |
ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) |
ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) |
| 254 |
TARGET_LINK_LIBRARIES(pcrecpp pcre) |
TARGET_LINK_LIBRARIES(pcrecpp pcre) |
| 334 |
|
|
| 335 |
IF(PCRE_BUILD_PCRECPP) |
IF(PCRE_BUILD_PCRECPP) |
| 336 |
INSTALL(TARGETS pcrecpp |
INSTALL(TARGETS pcrecpp |
| 337 |
RUNTIME DESTINATION bin |
RUNTIME DESTINATION bin |
| 338 |
LIBRARY DESTINATION lib |
LIBRARY DESTINATION lib |
| 339 |
ARCHIVE DESTINATION lib) |
ARCHIVE DESTINATION lib) |
| 340 |
INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) |
INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) |
| 341 |
ELSE(PCRE_BUILD_PCRECPP) |
ELSE(PCRE_BUILD_PCRECPP) |
| 342 |
# Remove pcrecpp.3 |
# Remove pcrecpp.3 |