| 56 |
# 2012-01-13 Stephen Kelly added out of source build support |
# 2012-01-13 Stephen Kelly added out of source build support |
| 57 |
# 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out |
# 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out |
| 58 |
# of the configure.ac file |
# of the configure.ac file |
| 59 |
|
# 2012-02-26 PH added support for libedit |
| 60 |
|
|
| 61 |
PROJECT(PCRE C CXX) |
PROJECT(PCRE C CXX) |
| 62 |
|
|
| 70 |
FIND_PACKAGE( BZip2 ) |
FIND_PACKAGE( BZip2 ) |
| 71 |
FIND_PACKAGE( ZLIB ) |
FIND_PACKAGE( ZLIB ) |
| 72 |
FIND_PACKAGE( Readline ) |
FIND_PACKAGE( Readline ) |
| 73 |
|
FIND_PACKAGE( Editline ) |
| 74 |
|
|
| 75 |
# Configuration checks |
# Configuration checks |
| 76 |
|
|
| 183 |
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) |
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) |
| 184 |
ENDIF(PCRE_SUPPORT_LIBZ) |
ENDIF(PCRE_SUPPORT_LIBZ) |
| 185 |
|
|
| 186 |
|
# editline lib |
| 187 |
|
IF(EDITLINE_FOUND) |
| 188 |
|
OPTION (PCRE_SUPPORT_LIBEDIT "Enable support for linking pcretest with libedit." OFF) |
| 189 |
|
ENDIF(EDITLINE_FOUND) |
| 190 |
|
IF(PCRE_SUPPORT_LIBEDIT) |
| 191 |
|
INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR}) |
| 192 |
|
ENDIF(PCRE_SUPPORT_LIBEDIT) |
| 193 |
|
|
| 194 |
# readline lib |
# readline lib |
| 195 |
IF(READLINE_FOUND) |
IF(READLINE_FOUND) |
| 196 |
OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON) |
OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON) |
| 249 |
SET(PCRE_BUILD_PCREGREP OFF) |
SET(PCRE_BUILD_PCREGREP OFF) |
| 250 |
ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8) |
ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8) |
| 251 |
|
|
| 252 |
|
IF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT) |
| 253 |
|
MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified") |
| 254 |
|
ENDIF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT) |
| 255 |
|
|
| 256 |
IF(PCRE_SUPPORT_BSR_ANYCRLF) |
IF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 257 |
SET(BSR_ANYCRLF 1) |
SET(BSR_ANYCRLF 1) |
| 258 |
ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) |
ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 285 |
SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY}) |
SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY}) |
| 286 |
ENDIF(PCRE_SUPPORT_LIBREADLINE) |
ENDIF(PCRE_SUPPORT_LIBREADLINE) |
| 287 |
|
|
| 288 |
|
# libedit is a plug-compatible alternative to libreadline |
| 289 |
|
|
| 290 |
|
IF(PCRE_SUPPORT_LIBEDIT) |
| 291 |
|
SET(SUPPORT_LIBEDIT 1) |
| 292 |
|
SET(PCRETEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY}) |
| 293 |
|
ENDIF(PCRE_SUPPORT_LIBEDIT) |
| 294 |
|
|
| 295 |
IF(PCRE_SUPPORT_LIBZ) |
IF(PCRE_SUPPORT_LIBZ) |
| 296 |
SET(SUPPORT_LIBZ 1) |
SET(SUPPORT_LIBZ 1) |
| 297 |
SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES}) |
SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES}) |
| 838 |
IF(ZLIB_FOUND) |
IF(ZLIB_FOUND) |
| 839 |
MESSAGE(STATUS " Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}") |
MESSAGE(STATUS " Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}") |
| 840 |
ELSE(ZLIB_FOUND) |
ELSE(ZLIB_FOUND) |
| 841 |
MESSAGE(STATUS " Link pcregrep with libz ......... : None" ) |
MESSAGE(STATUS " Link pcregrep with libz ......... : Library not found" ) |
| 842 |
ENDIF(ZLIB_FOUND) |
ENDIF(ZLIB_FOUND) |
| 843 |
IF(BZIP2_FOUND) |
IF(BZIP2_FOUND) |
| 844 |
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}") |
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}") |
| 845 |
ELSE(BZIP2_FOUND) |
ELSE(BZIP2_FOUND) |
| 846 |
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : None" ) |
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : Library not found" ) |
| 847 |
ENDIF(BZIP2_FOUND) |
ENDIF(BZIP2_FOUND) |
| 848 |
IF(NOT PCRE_SUPPORT_LIBREADLINE) |
IF(EDITLINE_FOUND) |
| 849 |
MESSAGE(STATUS " Link pcretest with libreadline .. : None" ) |
MESSAGE(STATUS " Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}") |
| 850 |
ELSE(NOT PCRE_SUPPORT_LIBREADLINE) |
ELSE(EDITLINE_FOUND) |
| 851 |
|
MESSAGE(STATUS " Link pcretest with libeditline .. : Library not found" ) |
| 852 |
|
ENDIF(EDITLINE_FOUND) |
| 853 |
|
IF(READLINE_FOUND) |
| 854 |
MESSAGE(STATUS " Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}") |
MESSAGE(STATUS " Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}") |
| 855 |
ENDIF(NOT PCRE_SUPPORT_LIBREADLINE) |
ELSE(READLINE_FOUND) |
| 856 |
|
MESSAGE(STATUS " Link pcretest with libreadline .. : Library not found" ) |
| 857 |
|
ENDIF(READLINE_FOUND) |
| 858 |
|
|
| 859 |
IF(MINGW AND NOT PCRE_STATIC) |
IF(MINGW AND NOT PCRE_STATIC) |
| 860 |
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}") |
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}") |
| 861 |
MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}") |
MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}") |