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

Contents of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1342 - (show annotations)
Mon Jul 1 12:28:12 2013 UTC (6 years, 1 month ago) by ph10
File MIME type: text/plain
File size: 31779 byte(s)
Remove SUPPORT_GCOV from config.h, because it is not used and is misleading.
(Coverage support does not need any code changes.)
1 # CMakeLists.txt
2 #
3 #
4 # 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/
6 #
7 # Original listfile by Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
8 # 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 # 2011-10-04 Sheri added support for including coff data in windows shared libraries
45 # compiled with MINGW if pcre.rc and/or pcreposix.rc are placed in
46 # the source dir by the user prior to building
47 # 2011-10-04 Sheri changed various add_test's to use exes' location built instead
48 # of DEBUG location only (likely only matters in MSVC)
49 # 2011-10-04 Sheri added scripts to provide needed variables to RunTest and
50 # RunGrepTest (used for UNIX and Msys)
51 # 2011-10-04 Sheri added scripts to provide needed variables and to execute
52 # RunTest.bat in Win32 (for effortless testing with "make test")
53 # 2011-10-04 Sheri Increased minimum required cmake version
54 # 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c
55 # 2012-01-10 Zoltan Herczeg added libpcre16 support
56 # 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
58 # of the configure.ac file
59 # 2012-02-26 PH added support for libedit
60 # 2012-09-06 PH added support for PCRE_EBCDIC_NL25
61 # 2012-09-08 ChPe added PCRE32 support
62 # 2012-10-23 PH added support for VALGRIND and GCOV
63 # 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings
64 # 2013-07-01 PH realized that the "support" for GCOV was a total nonsense and
65 # so it has been removed.
66
67 PROJECT(PCRE C CXX)
68
69 # Increased minimum to 2.8.0 to support newer add_test features
70
71 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
72
73 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake
74
75 # external packages
76 FIND_PACKAGE( BZip2 )
77 FIND_PACKAGE( ZLIB )
78 FIND_PACKAGE( Readline )
79 FIND_PACKAGE( Editline )
80
81 # Configuration checks
82
83 INCLUDE(CheckIncludeFile)
84 INCLUDE(CheckIncludeFileCXX)
85 INCLUDE(CheckFunctionExists)
86 INCLUDE(CheckTypeSize)
87
88 CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
89 CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
90 CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H)
91 CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
92 CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
93 CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
94 CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
95
96 CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H)
97 CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H)
98
99 CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY)
100 CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
101 CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
102 CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
103 CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ)
104 CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64)
105
106 CHECK_TYPE_SIZE("long long" LONG_LONG)
107 CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG)
108
109 # User-configurable options
110 #
111 # (Note: CMakeSetup displays these in alphabetical order, regardless of
112 # the order we use here)
113
114 SET(BUILD_SHARED_LIBS OFF CACHE BOOL
115 "Build shared libraries instead of static ones.")
116
117 OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCRE library" ON)
118
119 OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF)
120
121 OPTION(PCRE_BUILD_PCRE32 "Build 32 bit PCRE library" OFF)
122
123 OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)
124
125 SET(PCRE_EBCDIC OFF CACHE BOOL
126 "Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)")
127
128 SET(PCRE_EBCDIC_NL25 OFF CACHE BOOL
129 "Use 0x25 as EBCDIC NL character instead of 0x15; implies EBCDIC.")
130
131 SET(PCRE_LINK_SIZE "2" CACHE STRING
132 "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.")
133
134 SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING
135 "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.")
136
137 SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING
138 "Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.")
139
140 SET(PCREGREP_BUFSIZE "20480" CACHE STRING
141 "Buffer size parameter for pcregrep. See PCREGREP_BUFSIZE in config.h.in for details.")
142
143 SET(PCRE_NEWLINE "LF" CACHE STRING
144 "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).")
145
146 SET(PCRE_NO_RECURSE OFF CACHE BOOL
147 "If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.")
148
149 SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING
150 "Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.")
151
152 SET(PCRE_SUPPORT_JIT OFF CACHE BOOL
153 "Enable support for Just-in-time compiling.")
154
155 SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL
156 "Enable use of Just-in-time compiling in pcregrep.")
157
158 SET(PCRE_SUPPORT_UTF OFF CACHE BOOL
159 "Enable support for Unicode Transformation Format (UTF-8/UTF-16/UTF-32) encoding.")
160
161 SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
162 "Enable support for Unicode properties (if set, UTF support will be enabled as well).")
163
164 SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
165 "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")
166
167 SET(PCRE_SUPPORT_VALGRIND OFF CACHE BOOL
168 "Enable Valgrind support.")
169
170 OPTION(PCRE_SHOW_REPORT "Show the final configuration report" ON)
171 OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON)
172 OPTION(PCRE_BUILD_TESTS "Build the tests" ON)
173
174 IF (MINGW)
175 OPTION(NON_STANDARD_LIB_PREFIX
176 "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc."
177 OFF)
178
179 OPTION(NON_STANDARD_LIB_SUFFIX
180 "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc."
181 OFF)
182 ENDIF(MINGW)
183
184 # bzip2 lib
185 IF(BZIP2_FOUND)
186 OPTION (PCRE_SUPPORT_LIBBZ2 "Enable support for linking pcregrep with libbz2." ON)
187 ENDIF(BZIP2_FOUND)
188 IF(PCRE_SUPPORT_LIBBZ2)
189 INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
190 ENDIF(PCRE_SUPPORT_LIBBZ2)
191
192 # zlib
193 IF(ZLIB_FOUND)
194 OPTION (PCRE_SUPPORT_LIBZ "Enable support for linking pcregrep with libz." ON)
195 ENDIF(ZLIB_FOUND)
196 IF(PCRE_SUPPORT_LIBZ)
197 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
198 ENDIF(PCRE_SUPPORT_LIBZ)
199
200 # editline lib
201 IF(EDITLINE_FOUND)
202 OPTION (PCRE_SUPPORT_LIBEDIT "Enable support for linking pcretest with libedit." OFF)
203 ENDIF(EDITLINE_FOUND)
204 IF(PCRE_SUPPORT_LIBEDIT)
205 INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR})
206 ENDIF(PCRE_SUPPORT_LIBEDIT)
207
208 # readline lib
209 IF(READLINE_FOUND)
210 OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON)
211 ENDIF(READLINE_FOUND)
212 IF(PCRE_SUPPORT_LIBREADLINE)
213 INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR})
214 ENDIF(PCRE_SUPPORT_LIBREADLINE)
215
216 # Prepare build configuration
217
218 SET(pcre_have_type_traits 0)
219 SET(pcre_have_bits_type_traits 0)
220
221 IF(HAVE_TYPE_TRAITS_H)
222 SET(pcre_have_type_traits 1)
223 ENDIF(HAVE_TYPE_TRAITS_H)
224
225 IF(HAVE_BITS_TYPE_TRAITS_H)
226 SET(pcre_have_bits_type_traits 1)
227 ENDIF(HAVE_BITS_TYPE_TRAITS_H)
228
229 SET(pcre_have_long_long 0)
230 SET(pcre_have_ulong_long 0)
231
232 IF(HAVE_LONG_LONG)
233 SET(pcre_have_long_long 1)
234 ENDIF(HAVE_LONG_LONG)
235
236 IF(HAVE_UNSIGNED_LONG_LONG)
237 SET(pcre_have_ulong_long 1)
238 ENDIF(HAVE_UNSIGNED_LONG_LONG)
239
240 IF(NOT BUILD_SHARED_LIBS)
241 SET(PCRE_STATIC 1)
242 ENDIF(NOT BUILD_SHARED_LIBS)
243
244 IF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32)
245 MESSAGE(FATAL_ERROR "At least one of PCRE_BUILD_PCRE8, PCRE_BUILD_PCRE16 or PCRE_BUILD_PCRE32 must be enabled")
246 ENDIF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32)
247
248 IF(PCRE_BUILD_PCRE8)
249 SET(SUPPORT_PCRE8 1)
250 ENDIF(PCRE_BUILD_PCRE8)
251
252 IF(PCRE_BUILD_PCRE16)
253 SET(SUPPORT_PCRE16 1)
254 ENDIF(PCRE_BUILD_PCRE16)
255
256 IF(PCRE_BUILD_PCRE32)
257 SET(SUPPORT_PCRE32 1)
258 ENDIF(PCRE_BUILD_PCRE32)
259
260 IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)
261 MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the C++ library support")
262 SET(PCRE_BUILD_PCRECPP OFF)
263 ENDIF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)
264
265 IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
266 MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the pcregrep program")
267 SET(PCRE_BUILD_PCREGREP OFF)
268 ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
269
270 IF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT)
271 MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified")
272 ENDIF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT)
273
274 IF(PCRE_SUPPORT_BSR_ANYCRLF)
275 SET(BSR_ANYCRLF 1)
276 ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
277
278 IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES)
279 SET(SUPPORT_UTF 1)
280 SET(PCRE_SUPPORT_UTF ON)
281 ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES)
282
283 IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
284 SET(SUPPORT_UCP 1)
285 ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)
286
287 IF(PCRE_SUPPORT_JIT)
288 SET(SUPPORT_JIT 1)
289 ENDIF(PCRE_SUPPORT_JIT)
290
291 IF(PCRE_SUPPORT_PCREGREP_JIT)
292 SET(SUPPORT_PCREGREP_JIT 1)
293 ENDIF(PCRE_SUPPORT_PCREGREP_JIT)
294
295 IF(PCRE_SUPPORT_VALGRIND)
296 SET(SUPPORT_VALGRIND 1)
297 ENDIF(PCRE_SUPPORT_VALGRIND)
298
299 # This next one used to contain
300 # SET(PCRETEST_LIBS ${READLINE_LIBRARY})
301 # but I was advised to add the NCURSES test as well, along with
302 # some modifications to cmake/FindReadline.cmake which should
303 # make it possible to override the default if necessary. PH
304
305 IF(PCRE_SUPPORT_LIBREADLINE)
306 SET(SUPPORT_LIBREADLINE 1)
307 SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
308 ENDIF(PCRE_SUPPORT_LIBREADLINE)
309
310 # libedit is a plug-compatible alternative to libreadline
311
312 IF(PCRE_SUPPORT_LIBEDIT)
313 SET(SUPPORT_LIBEDIT 1)
314 SET(PCRETEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY})
315 ENDIF(PCRE_SUPPORT_LIBEDIT)
316
317 IF(PCRE_SUPPORT_LIBZ)
318 SET(SUPPORT_LIBZ 1)
319 SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})
320 ENDIF(PCRE_SUPPORT_LIBZ)
321
322 IF(PCRE_SUPPORT_LIBBZ2)
323 SET(SUPPORT_LIBBZ2 1)
324 SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${BZIP2_LIBRARIES})
325 ENDIF(PCRE_SUPPORT_LIBBZ2)
326
327 SET(NEWLINE "")
328
329 IF(PCRE_NEWLINE STREQUAL "LF")
330 SET(NEWLINE "10")
331 ENDIF(PCRE_NEWLINE STREQUAL "LF")
332 IF(PCRE_NEWLINE STREQUAL "CR")
333 SET(NEWLINE "13")
334 ENDIF(PCRE_NEWLINE STREQUAL "CR")
335 IF(PCRE_NEWLINE STREQUAL "CRLF")
336 SET(NEWLINE "3338")
337 ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
338 IF(PCRE_NEWLINE STREQUAL "ANY")
339 SET(NEWLINE "-1")
340 ENDIF(PCRE_NEWLINE STREQUAL "ANY")
341 IF(PCRE_NEWLINE STREQUAL "ANYCRLF")
342 SET(NEWLINE "-2")
343 ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF")
344
345 IF(NEWLINE STREQUAL "")
346 MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")
347 ENDIF(NEWLINE STREQUAL "")
348
349 IF(PCRE_EBCDIC)
350 SET(EBCDIC 1)
351 IF(PCRE_NEWLINE STREQUAL "LF")
352 SET(NEWLINE "21")
353 ENDIF(PCRE_NEWLINE STREQUAL "LF")
354 IF(PCRE_NEWLINE STREQUAL "CRLF")
355 SET(NEWLINE "3349")
356 ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
357 ENDIF(PCRE_EBCDIC)
358
359 IF(PCRE_EBCDIC_NL25)
360 SET(EBCDIC 1)
361 SET(EBCDIC_NL25 1)
362 IF(PCRE_NEWLINE STREQUAL "LF")
363 SET(NEWLINE "37")
364 ENDIF(PCRE_NEWLINE STREQUAL "LF")
365 IF(PCRE_NEWLINE STREQUAL "CRLF")
366 SET(NEWLINE "3365")
367 ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
368 ENDIF(PCRE_EBCDIC_NL25)
369
370 IF(PCRE_NO_RECURSE)
371 SET(NO_RECURSE 1)
372 ENDIF(PCRE_NO_RECURSE)
373
374 # Output files
375 CONFIGURE_FILE(config-cmake.h.in
376 ${PROJECT_BINARY_DIR}/config.h
377 @ONLY)
378
379 # Parse version numbers and date out of configure.ac
380
381 file(STRINGS ${PROJECT_SOURCE_DIR}/configure.ac
382 configure_lines
383 LIMIT_COUNT 50 # Read only the first 50 lines of the file
384 )
385
386 set(SEARCHED_VARIABLES "pcre_major" "pcre_minor" "pcre_prerelease" "pcre_date")
387 foreach(configure_line ${configure_lines})
388 foreach(_substitution_variable ${SEARCHED_VARIABLES})
389 string(TOUPPER ${_substitution_variable} _substitution_variable_upper)
390 if (NOT ${_substitution_variable_upper})
391 string(REGEX MATCH "m4_define\\(${_substitution_variable}, \\[(.*)\\]" MACTHED_STRING ${configure_line})
392 if (CMAKE_MATCH_1)
393 set(${_substitution_variable_upper} ${CMAKE_MATCH_1})
394 endif()
395 endif()
396 endforeach()
397 endforeach()
398
399 CONFIGURE_FILE(pcre.h.in
400 ${PROJECT_BINARY_DIR}/pcre.h
401 @ONLY)
402
403 # What about pcre-config and libpcre.pc?
404
405 IF(PCRE_BUILD_PCRECPP)
406 CONFIGURE_FILE(pcre_stringpiece.h.in
407 ${PROJECT_BINARY_DIR}/pcre_stringpiece.h
408 @ONLY)
409
410 CONFIGURE_FILE(pcrecpparg.h.in
411 ${PROJECT_BINARY_DIR}/pcrecpparg.h
412 @ONLY)
413 ENDIF(PCRE_BUILD_PCRECPP)
414
415 # Character table generation
416
417 OPTION(PCRE_REBUILD_CHARTABLES "Rebuild char tables" OFF)
418 IF(PCRE_REBUILD_CHARTABLES)
419 ADD_EXECUTABLE(dftables dftables.c)
420
421 GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION)
422
423 ADD_CUSTOM_COMMAND(
424 COMMENT "Generating character tables (pcre_chartables.c) for current locale"
425 DEPENDS dftables
426 COMMAND ${DFTABLES_EXE}
427 ARGS ${PROJECT_BINARY_DIR}/pcre_chartables.c
428 OUTPUT ${PROJECT_BINARY_DIR}/pcre_chartables.c
429 )
430 ELSE(PCRE_REBUILD_CHARTABLES)
431 CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/pcre_chartables.c.dist
432 ${PROJECT_BINARY_DIR}/pcre_chartables.c
433 COPYONLY)
434 ENDIF(PCRE_REBUILD_CHARTABLES)
435
436 # Source code
437
438 SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/pcre.h)
439
440 IF(PCRE_BUILD_PCRE8)
441 SET(PCRE_SOURCES
442 pcre_byte_order.c
443 pcre_chartables.c
444 pcre_compile.c
445 pcre_config.c
446 pcre_dfa_exec.c
447 pcre_exec.c
448 pcre_fullinfo.c
449 pcre_get.c
450 pcre_globals.c
451 pcre_jit_compile.c
452 pcre_maketables.c
453 pcre_newline.c
454 pcre_ord2utf8.c
455 pcre_refcount.c
456 pcre_string_utils.c
457 pcre_study.c
458 pcre_tables.c
459 pcre_ucd.c
460 pcre_valid_utf8.c
461 pcre_version.c
462 pcre_xclass.c
463 )
464
465 SET(PCREPOSIX_HEADERS pcreposix.h)
466
467 SET(PCREPOSIX_SOURCES pcreposix.c)
468
469 ENDIF(PCRE_BUILD_PCRE8)
470
471 IF(PCRE_BUILD_PCRE16)
472 SET(PCRE16_SOURCES
473 pcre16_byte_order.c
474 pcre16_chartables.c
475 pcre16_compile.c
476 pcre16_config.c
477 pcre16_dfa_exec.c
478 pcre16_exec.c
479 pcre16_fullinfo.c
480 pcre16_get.c
481 pcre16_globals.c
482 pcre16_jit_compile.c
483 pcre16_maketables.c
484 pcre16_newline.c
485 pcre16_ord2utf16.c
486 pcre16_refcount.c
487 pcre16_string_utils.c
488 pcre16_study.c
489 pcre16_tables.c
490 pcre16_ucd.c
491 pcre16_utf16_utils.c
492 pcre16_valid_utf16.c
493 pcre16_version.c
494 pcre16_xclass.c
495 )
496 ENDIF(PCRE_BUILD_PCRE16)
497
498 IF(PCRE_BUILD_PCRE32)
499 SET(PCRE32_SOURCES
500 pcre32_byte_order.c
501 pcre32_chartables.c
502 pcre32_compile.c
503 pcre32_config.c
504 pcre32_dfa_exec.c
505 pcre32_exec.c
506 pcre32_fullinfo.c
507 pcre32_get.c
508 pcre32_globals.c
509 pcre32_jit_compile.c
510 pcre32_maketables.c
511 pcre32_newline.c
512 pcre32_ord2utf32.c
513 pcre32_refcount.c
514 pcre32_string_utils.c
515 pcre32_study.c
516 pcre32_tables.c
517 pcre32_ucd.c
518 pcre32_utf32_utils.c
519 pcre32_valid_utf32.c
520 pcre32_version.c
521 pcre32_xclass.c
522 )
523 ENDIF(PCRE_BUILD_PCRE32)
524
525 IF(MINGW AND NOT PCRE_STATIC)
526 IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
527 ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o
528 PRE-LINK
529 COMMAND windres ARGS pcre.rc pcre.o
530 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
531 COMMENT Using pcre coff info in mingw build)
532 SET(PCRE_SOURCES
533 ${PCRE_SOURCES} ${PROJECT_SOURCE_DIR}/pcre.o
534 )
535 ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
536 IF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc)
537 ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcreposix.o
538 PRE-LINK
539 COMMAND windres ARGS pcreposix.rc pcreposix.o
540 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
541 COMMENT Using pcreposix coff info in mingw build)
542 SET(PCREPOSIX_SOURCES
543 ${PCREPOSIX_SOURCES} ${PROJECT_SOURCE_DIR}/pcreposix.o
544 )
545 ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc)
546 ENDIF(MINGW AND NOT PCRE_STATIC)
547
548 SET(PCRECPP_HEADERS
549 pcrecpp.h
550 pcre_scanner.h
551 ${PROJECT_BINARY_DIR}/pcrecpparg.h
552 ${PROJECT_BINARY_DIR}/pcre_stringpiece.h
553 )
554
555 SET(PCRECPP_SOURCES
556 pcrecpp.cc
557 pcre_scanner.cc
558 pcre_stringpiece.cc
559 )
560
561 # Build setup
562
563 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
564
565 IF(MSVC)
566 ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
567 ENDIF(MSVC)
568
569 SET(CMAKE_INCLUDE_CURRENT_DIR 1)
570 # needed to make sure to not link debug libs
571 # against release libs and vice versa
572 IF(WIN32)
573 SET(CMAKE_DEBUG_POSTFIX "d")
574 ENDIF(WIN32)
575
576 SET(targets)
577
578 # Libraries
579 # pcre
580 IF(PCRE_BUILD_PCRE8)
581 ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
582 SET(targets ${targets} pcre)
583 ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})
584 SET(targets ${targets} pcreposix)
585 TARGET_LINK_LIBRARIES(pcreposix pcre)
586
587 IF(MINGW AND NOT PCRE_STATIC)
588 IF(NON_STANDARD_LIB_PREFIX)
589 SET_TARGET_PROPERTIES(pcre pcreposix
590 PROPERTIES PREFIX ""
591 )
592 ENDIF(NON_STANDARD_LIB_PREFIX)
593
594 IF(NON_STANDARD_LIB_SUFFIX)
595 SET_TARGET_PROPERTIES(pcre pcreposix
596 PROPERTIES SUFFIX "-0.dll"
597 )
598 ENDIF(NON_STANDARD_LIB_SUFFIX)
599 ENDIF(MINGW AND NOT PCRE_STATIC)
600
601 ENDIF(PCRE_BUILD_PCRE8)
602
603 IF(PCRE_BUILD_PCRE16)
604 ADD_LIBRARY(pcre16 ${PCRE_HEADERS} ${PCRE16_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
605 SET(targets ${targets} pcre16)
606
607 IF(MINGW AND NOT PCRE_STATIC)
608 IF(NON_STANDARD_LIB_PREFIX)
609 SET_TARGET_PROPERTIES(pcre16
610 PROPERTIES PREFIX ""
611 )
612 ENDIF(NON_STANDARD_LIB_PREFIX)
613
614 IF(NON_STANDARD_LIB_SUFFIX)
615 SET_TARGET_PROPERTIES(pcre16
616 PROPERTIES SUFFIX "-0.dll"
617 )
618 ENDIF(NON_STANDARD_LIB_SUFFIX)
619 ENDIF(MINGW AND NOT PCRE_STATIC)
620
621 ENDIF(PCRE_BUILD_PCRE16)
622
623 IF(PCRE_BUILD_PCRE32)
624 ADD_LIBRARY(pcre32 ${PCRE_HEADERS} ${PCRE32_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
625 SET(targets ${targets} pcre32)
626
627 IF(MINGW AND NOT PCRE_STATIC)
628 IF(NON_STANDARD_LIB_PREFIX)
629 SET_TARGET_PROPERTIES(pcre32
630 PROPERTIES PREFIX ""
631 )
632 ENDIF(NON_STANDARD_LIB_PREFIX)
633
634 IF(NON_STANDARD_LIB_SUFFIX)
635 SET_TARGET_PROPERTIES(pcre32
636 PROPERTIES SUFFIX "-0.dll"
637 )
638 ENDIF(NON_STANDARD_LIB_SUFFIX)
639 ENDIF(MINGW AND NOT PCRE_STATIC)
640
641 ENDIF(PCRE_BUILD_PCRE32)
642
643 # pcrecpp
644 IF(PCRE_BUILD_PCRECPP)
645 ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
646 SET(targets ${targets} pcrecpp)
647 TARGET_LINK_LIBRARIES(pcrecpp pcre)
648
649 IF(MINGW AND NOT PCRE_STATIC)
650 IF(NON_STANDARD_LIB_PREFIX)
651 SET_TARGET_PROPERTIES(pcrecpp
652 PROPERTIES PREFIX ""
653 )
654 ENDIF(NON_STANDARD_LIB_PREFIX)
655
656 IF(NON_STANDARD_LIB_SUFFIX)
657 SET_TARGET_PROPERTIES(pcrecpp
658 PROPERTIES SUFFIX "-0.dll"
659 )
660 ENDIF(NON_STANDARD_LIB_SUFFIX)
661 ENDIF(MINGW AND NOT PCRE_STATIC)
662 ENDIF(PCRE_BUILD_PCRECPP)
663
664
665 # Executables
666
667 # Removed by PH (2008-01-23) because pcredemo shouldn't really be built
668 # automatically, and it gave trouble in some environments anyway.
669 # ADD_EXECUTABLE(pcredemo pcredemo.c)
670 # TARGET_LINK_LIBRARIES(pcredemo pcreposix)
671 # IF(NOT BUILD_SHARED_LIBS)
672 # # make sure to not use declspec(dllimport) in static mode on windows
673 # SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")
674 # ENDIF(NOT BUILD_SHARED_LIBS)
675
676 IF(PCRE_BUILD_PCREGREP)
677 ADD_EXECUTABLE(pcregrep pcregrep.c)
678 SET(targets ${targets} pcregrep)
679 TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})
680 ENDIF(PCRE_BUILD_PCREGREP)
681
682 # Testing
683 IF(PCRE_BUILD_TESTS)
684 ENABLE_TESTING()
685
686 SET(PCRETEST_SOURCES pcretest.c)
687 IF(PCRE_BUILD_PCRE8)
688 LIST(APPEND PCRETEST_SOURCES pcre_printint.c)
689 ENDIF(PCRE_BUILD_PCRE8)
690 IF(PCRE_BUILD_PCRE16)
691 LIST(APPEND PCRETEST_SOURCES pcre16_printint.c)
692 ENDIF(PCRE_BUILD_PCRE16)
693 IF(PCRE_BUILD_PCRE32)
694 LIST(APPEND PCRETEST_SOURCES pcre32_printint.c)
695 ENDIF(PCRE_BUILD_PCRE32)
696
697 ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES})
698 SET(targets ${targets} pcretest)
699 IF(PCRE_BUILD_PCRE8)
700 LIST(APPEND PCRETEST_LIBS pcreposix pcre)
701 ENDIF(PCRE_BUILD_PCRE8)
702 IF(PCRE_BUILD_PCRE16)
703 LIST(APPEND PCRETEST_LIBS pcre16)
704 ENDIF(PCRE_BUILD_PCRE16)
705 IF(PCRE_BUILD_PCRE32)
706 LIST(APPEND PCRETEST_LIBS pcre32)
707 ENDIF(PCRE_BUILD_PCRE32)
708 TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS})
709
710 IF(PCRE_SUPPORT_JIT)
711 ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c)
712 SET(targets ${targets} pcre_jit_test)
713 SET(PCRE_JIT_TEST_LIBS )
714 IF(PCRE_BUILD_PCRE8)
715 LIST(APPEND PCRE_JIT_TEST_LIBS pcre)
716 ENDIF(PCRE_BUILD_PCRE8)
717 IF(PCRE_BUILD_PCRE16)
718 LIST(APPEND PCRE_JIT_TEST_LIBS pcre16)
719 ENDIF(PCRE_BUILD_PCRE16)
720 IF(PCRE_BUILD_PCRE32)
721 LIST(APPEND PCRE_JIT_TEST_LIBS pcre32)
722 ENDIF(PCRE_BUILD_PCRE32)
723 TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS})
724 ENDIF(PCRE_SUPPORT_JIT)
725
726 IF(PCRE_BUILD_PCRECPP)
727 ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)
728 SET(targets ${targets} pcrecpp_unittest)
729 TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp)
730 IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
731 SET_TARGET_PROPERTIES(pcrecpp
732 PROPERTIES PREFIX ""
733 )
734 ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
735
736 ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)
737 SET(targets ${targets} pcre_scanner_unittest)
738 TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)
739
740 ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc)
741 SET(targets ${targets} pcre_stringpiece_unittest)
742 TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp)
743 ENDIF(PCRE_BUILD_PCRECPP)
744
745 # exes in Debug location tested by the RunTest shell script
746 # via "make test"
747 IF(PCRE_BUILD_PCREGREP)
748 GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION)
749 ENDIF(PCRE_BUILD_PCREGREP)
750
751 GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION)
752
753 # =================================================
754 # Write out a CTest configuration file
755 #
756 FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest
757 "# This is a generated file.
758 MESSAGE(\"When testing is complete, review test output in the
759 \\\"${PROJECT_BINARY_DIR}/Testing/Temporary\\\" folder.\")
760 MESSAGE(\" \")
761 ")
762
763 FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh
764 "#! /bin/sh
765 # This is a generated file.
766 srcdir=${PROJECT_SOURCE_DIR}
767 pcretest=${PCRETEST_EXE}
768 source ${PROJECT_SOURCE_DIR}/RunTest
769 if test \"$?\" != \"0\"; then exit 1; fi
770 # End
771 ")
772
773 IF(UNIX)
774 ADD_TEST(pcre_test sh ${PROJECT_BINARY_DIR}/pcre_test.sh)
775 ENDIF(UNIX)
776
777 IF(PCRE_BUILD_PCREGREP)
778 FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_grep_test.sh
779 "#! /bin/sh
780 # This is a generated file.
781 srcdir=${PROJECT_SOURCE_DIR}
782 pcregrep=${PCREGREP_EXE}
783 pcretest=${PCRETEST_EXE}
784 source ${PROJECT_SOURCE_DIR}/RunGrepTest
785 if test \"$?\" != \"0\"; then exit 1; fi
786 # End
787 ")
788
789 IF(UNIX)
790 ADD_TEST(pcre_grep_test sh ${PROJECT_BINARY_DIR}/pcre_grep_test.sh)
791 ENDIF(UNIX)
792 ENDIF(PCRE_BUILD_PCREGREP)
793
794 IF(WIN32)
795 # Provide environment for executing the bat file version of RunTest
796 FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc)
797 FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin)
798 FILE(TO_NATIVE_PATH ${PCRETEST_EXE} winexe)
799
800 FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.bat
801 "\@REM This is a generated file.
802 \@echo off
803 setlocal
804 SET srcdir=\"${winsrc}\"
805 SET pcretest=\"${winexe}\"
806 if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcretest.exe\"
807 call %srcdir%\\RunTest.Bat
808 if errorlevel 1 exit /b 1
809 echo RunTest.bat tests successfully completed
810 ")
811
812 ADD_TEST(NAME pcre_test_bat
813 COMMAND pcre_test.bat)
814 SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES
815 PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")
816
817 IF("$ENV{OSTYPE}" STREQUAL "msys")
818 # Both the sh and bat file versions of RunTest are run if make test is used
819 # in msys
820 ADD_TEST(pcre_test_sh sh.exe ${PROJECT_BINARY_DIR}/pcre_test.sh)
821 IF(PCRE_BUILD_PCREGREP)
822 ADD_TEST(pcre_grep_test sh.exe ${PROJECT_BINARY_DIR}/pcre_grep_test.sh)
823 ENDIF(PCRE_BUILD_PCREGREP)
824 ENDIF("$ENV{OSTYPE}" STREQUAL "msys")
825
826 ENDIF(WIN32)
827
828 # Changed to accommodate testing whichever location was just built
829
830 IF(PCRE_SUPPORT_JIT)
831 ADD_TEST(pcre_jit_test pcre_jit_test)
832 ENDIF(PCRE_SUPPORT_JIT)
833
834 IF(PCRE_BUILD_PCRECPP)
835 ADD_TEST(pcrecpp_test pcrecpp_unittest)
836 ADD_TEST(pcre_scanner_test pcre_scanner_unittest)
837 ADD_TEST(pcre_stringpiece_test pcre_stringpiece_unittest)
838 ENDIF(PCRE_BUILD_PCRECPP)
839
840 ENDIF(PCRE_BUILD_TESTS)
841
842 # Installation
843 SET(CMAKE_INSTALL_ALWAYS 1)
844
845 INSTALL(TARGETS ${targets}
846 RUNTIME DESTINATION bin
847 LIBRARY DESTINATION lib
848 ARCHIVE DESTINATION lib)
849
850 INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include)
851
852 FILE(GLOB html ${PROJECT_SOURCE_DIR}/doc/html/*.html)
853 FILE(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1)
854 FILE(GLOB man3 ${PROJECT_SOURCE_DIR}/doc/*.3)
855
856 IF(PCRE_BUILD_PCRECPP)
857 INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include)
858 ELSE(PCRE_BUILD_PCRECPP)
859 # Remove pcrecpp.3
860 FOREACH(man ${man3})
861 GET_FILENAME_COMPONENT(man_tmp ${man} NAME)
862 IF(NOT man_tmp STREQUAL "pcrecpp.3")
863 SET(man3_new ${man3} ${man})
864 ENDIF(NOT man_tmp STREQUAL "pcrecpp.3")
865 ENDFOREACH(man ${man3})
866 SET(man3 ${man3_new})
867 ENDIF(PCRE_BUILD_PCRECPP)
868
869 INSTALL(FILES ${man1} DESTINATION man/man1)
870 INSTALL(FILES ${man3} DESTINATION man/man3)
871 INSTALL(FILES ${html} DESTINATION share/doc/pcre/html)
872
873 # help, only for nice output
874 IF(BUILD_SHARED_LIBS)
875 SET(BUILD_STATIC_LIBS OFF)
876 ELSE(BUILD_SHARED_LIBS)
877 SET(BUILD_STATIC_LIBS ON)
878 ENDIF(BUILD_SHARED_LIBS)
879
880 IF(PCRE_SHOW_REPORT)
881 STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
882 IF (CMAKE_C_FLAGS)
883 SET(cfsp " ")
884 ENDIF(CMAKE_C_FLAGS)
885 IF (CMAKE_CXX_FLAGS)
886 SET(cxxfsp " ")
887 ENDIF(CMAKE_CXX_FLAGS)
888 MESSAGE(STATUS "")
889 MESSAGE(STATUS "")
890 MESSAGE(STATUS "PCRE configuration summary:")
891 MESSAGE(STATUS "")
892 MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
893 MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
894 MESSAGE(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}")
895 MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}")
896 MESSAGE(STATUS " C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}${cxxfsp}${CMAKE_CXX_FLAGS_${buildtype}}")
897 MESSAGE(STATUS "")
898 MESSAGE(STATUS " Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}")
899 MESSAGE(STATUS " Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}")
900 MESSAGE(STATUS " Build 32 bit PCRE library ....... : ${PCRE_BUILD_PCRE32}")
901 MESSAGE(STATUS " Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")
902 MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
903 MESSAGE(STATUS " Enable UTF support .............. : ${PCRE_SUPPORT_UTF}")
904 MESSAGE(STATUS " Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
905 MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE_NEWLINE}")
906 MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")
907 MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE_EBCDIC}")
908 MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}")
909 MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}")
910 MESSAGE(STATUS " No stack recursion .............. : ${PCRE_NO_RECURSE}")
911 MESSAGE(STATUS " POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}")
912 MESSAGE(STATUS " Internal link size .............. : ${PCRE_LINK_SIZE}")
913 MESSAGE(STATUS " Match limit ..................... : ${PCRE_MATCH_LIMIT}")
914 MESSAGE(STATUS " Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}")
915 MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}")
916 MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}")
917 MESSAGE(STATUS " Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}")
918 MESSAGE(STATUS " Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}")
919 MESSAGE(STATUS " Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}")
920 MESSAGE(STATUS " Build tests (implies pcretest .. : ${PCRE_BUILD_TESTS}")
921 MESSAGE(STATUS " and pcregrep)")
922 IF(ZLIB_FOUND)
923 MESSAGE(STATUS " Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")
924 ELSE(ZLIB_FOUND)
925 MESSAGE(STATUS " Link pcregrep with libz ......... : Library not found" )
926 ENDIF(ZLIB_FOUND)
927 IF(BZIP2_FOUND)
928 MESSAGE(STATUS " Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}")
929 ELSE(BZIP2_FOUND)
930 MESSAGE(STATUS " Link pcregrep with libbz2 ....... : Library not found" )
931 ENDIF(BZIP2_FOUND)
932 IF(EDITLINE_FOUND)
933 MESSAGE(STATUS " Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}")
934 ELSE(EDITLINE_FOUND)
935 MESSAGE(STATUS " Link pcretest with libeditline .. : Library not found" )
936 ENDIF(EDITLINE_FOUND)
937 IF(READLINE_FOUND)
938 MESSAGE(STATUS " Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}")
939 ELSE(READLINE_FOUND)
940 MESSAGE(STATUS " Link pcretest with libreadline .. : Library not found" )
941 ENDIF(READLINE_FOUND)
942 MESSAGE(STATUS " Support Valgrind .................: ${PCRE_SUPPORT_VALGRIND}")
943 MESSAGE(STATUS " Support coverage .................: ${PCRE_SUPPORT_COVERAGE}")
944
945 IF(MINGW AND NOT PCRE_STATIC)
946 MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")
947 MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}")
948 ENDIF(MINGW AND NOT PCRE_STATIC)
949 MESSAGE(STATUS "")
950 ENDIF(PCRE_SHOW_REPORT)
951
952 # end CMakeLists.txt

  ViewVC Help
Powered by ViewVC 1.1.5