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

Contents of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 939 - (hide annotations) (download)
Sun Feb 26 17:21:43 2012 UTC (2 years, 1 month ago) by ph10
File MIME type: text/plain
File size: 29420 byte(s)
CMake support for linking pcretest with libedit.

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12