~ubuntu-branches/ubuntu/trusty/pcre3/trusty

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Mark Baker
  • Date: 2012-09-13 19:58:45 UTC
  • mfrom: (23.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120913195845-wd12z63sm0b07n59
Tags: 1:8.31-1
* New upstream release
* Applied patch from upstream bugzilla #1287 to fix bug where wrong
  value is in re_nsub in some cases (Closes: #686495)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
# 2012-01-13 Stephen Kelly added out of source build support
57
57
# 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out
58
58
#            of the configure.ac file
 
59
# 2012-02-26 PH added support for libedit
59
60
 
60
61
PROJECT(PCRE C CXX)
61
62
 
69
70
FIND_PACKAGE( BZip2 )
70
71
FIND_PACKAGE( ZLIB )
71
72
FIND_PACKAGE( Readline )
 
73
FIND_PACKAGE( Editline )
72
74
 
73
75
# Configuration checks
74
76
 
181
183
  INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
182
184
ENDIF(PCRE_SUPPORT_LIBZ)
183
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
 
184
194
# readline lib
185
195
IF(READLINE_FOUND)
186
196
  OPTION (PCRE_SUPPORT_LIBREADLINE  "Enable support for linking pcretest with libreadline." ON)
239
249
        SET(PCRE_BUILD_PCREGREP OFF)
240
250
ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
241
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
 
242
256
IF(PCRE_SUPPORT_BSR_ANYCRLF)
243
257
        SET(BSR_ANYCRLF 1)
244
258
ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
271
285
        SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
272
286
ENDIF(PCRE_SUPPORT_LIBREADLINE)
273
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
 
274
295
IF(PCRE_SUPPORT_LIBZ)
275
296
        SET(SUPPORT_LIBZ 1)
276
297
        SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})
817
838
  IF(ZLIB_FOUND)
818
839
    MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")
819
840
  ELSE(ZLIB_FOUND)
820
 
    MESSAGE(STATUS "  Link pcregrep with libz ......... : None" )
 
841
    MESSAGE(STATUS "  Link pcregrep with libz ......... : Library not found" )
821
842
  ENDIF(ZLIB_FOUND)
822
843
  IF(BZIP2_FOUND)
823
844
    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}")
824
845
  ELSE(BZIP2_FOUND)
825
 
    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : None" )
 
846
    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : Library not found" )
826
847
  ENDIF(BZIP2_FOUND)
827
 
  IF(NOT PCRE_SUPPORT_LIBREADLINE)
828
 
    MESSAGE(STATUS "  Link pcretest with libreadline .. : None" )
829
 
  ELSE(NOT PCRE_SUPPORT_LIBREADLINE)
 
848
  IF(EDITLINE_FOUND)
 
849
    MESSAGE(STATUS "  Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}")
 
850
  ELSE(EDITLINE_FOUND)
 
851
    MESSAGE(STATUS "  Link pcretest with libeditline .. : Library not found" )
 
852
  ENDIF(EDITLINE_FOUND)
 
853
  IF(READLINE_FOUND)
830
854
    MESSAGE(STATUS "  Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}")
831
 
  ENDIF(NOT PCRE_SUPPORT_LIBREADLINE)
 
855
  ELSE(READLINE_FOUND)
 
856
    MESSAGE(STATUS "  Link pcretest with libreadline .. : Library not found" )
 
857
  ENDIF(READLINE_FOUND)
 
858
 
832
859
  IF(MINGW AND NOT PCRE_STATIC)
833
860
    MESSAGE(STATUS "  Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")
834
861
    MESSAGE(STATUS "  Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}")