/[pcre]/code/trunk/CMakeLists.txt
ViewVC logotype

Diff of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 938 by ph10, Sat Jan 21 16:37:17 2012 UTC revision 939 by ph10, Sun Feb 26 17:21:43 2012 UTC
# Line 56  Line 56 
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    
# Line 69  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_D Line 70  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_D
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    
# Line 181  IF(PCRE_SUPPORT_LIBZ) Line 183  IF(PCRE_SUPPORT_LIBZ)
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)
# Line 239  IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUIL Line 249  IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUIL
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)
# Line 271  IF(PCRE_SUPPORT_LIBREADLINE) Line 285  IF(PCRE_SUPPORT_LIBREADLINE)
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})
# Line 817  IF(PCRE_SHOW_REPORT) Line 838  IF(PCRE_SHOW_REPORT)
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}")

Legend:
Removed from v.938  
changed lines
  Added in v.939

  ViewVC Help
Powered by ViewVC 1.1.5