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

Contents of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.5