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

Contents of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 311 - (hide annotations) (download)
Wed Jan 23 17:34:58 2008 UTC (6 years, 6 months ago) by ph10
File MIME type: text/plain
File size: 16253 byte(s)
Applied Sheri's patch to CMakeLists.txt to add library name options and correct 
the recursion comment.

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 311 # 2008-01-22 Sheri aded options for backward compatibility of library names when
19     # 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 pcre.dll,
22     # 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 ph10 137
28     PROJECT(PCRE C CXX)
29    
30     CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6)
31    
32 ph10 303 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) # for FindReadline.cmake
33    
34     # external packages
35     FIND_PACKAGE( BZip2 )
36     FIND_PACKAGE( ZLIB )
37     FIND_PACKAGE( Readline )
38    
39 ph10 137 # Configuration checks
40    
41     INCLUDE(CheckIncludeFile)
42     INCLUDE(CheckIncludeFileCXX)
43     INCLUDE(CheckFunctionExists)
44     INCLUDE(CheckTypeSize)
45    
46 ph10 303 CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
47 ph10 137 CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
48     CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
49 ph10 303 CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
50     CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
51 ph10 137
52     CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H)
53     CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H)
54    
55     CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY)
56     CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
57     CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
58 ph10 303 CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
59     CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ)
60     CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64)
61 ph10 137
62     CHECK_TYPE_SIZE("long long" LONG_LONG)
63     CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG)
64    
65     # User-configurable options
66     #
67     # (Note: CMakeSetup displays these in alphabetical order, regardless of
68     # the order we use here)
69    
70 ph10 144 SET(BUILD_SHARED_LIBS OFF CACHE BOOL
71     "Build shared libraries instead of static ones.")
72 ph10 137
73     OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)
74    
75 ph10 144 SET(PCRE_EBCDIC OFF CACHE BOOL
76 ph10 137 "Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems)")
77    
78     SET(PCRE_LINK_SIZE "2" CACHE STRING
79     "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.")
80    
81     SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING
82     "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.")
83    
84     SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING
85     "Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.")
86    
87     SET(PCRE_NEWLINE "LF" CACHE STRING
88 ph10 258 "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).")
89 ph10 137
90 ph10 199 SET(PCRE_NO_RECURSE OFF CACHE BOOL
91 ph10 137 "If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.")
92    
93     SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING
94     "Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.")
95    
96 ph10 144 SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
97 ph10 137 "Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)")
98    
99 ph10 144 SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL
100 ph10 137 "Enable support for the Unicode UTF-8 encoding.")
101    
102 ph10 258 SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
103     "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")
104    
105 ph10 311 SET(NON_STANDARD_LIB_PREFIX OFF CACHE BOOL
106     "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc.")
107    
108     SET(NON_STANDARD_LIB_SUFFIX OFF CACHE BOOL
109     "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc.")
110    
111 ph10 303 # bzip2 lib
112     IF(BZIP2_FOUND)
113     OPTION (PCRE_SUPPORT_LIBBZ2 "Enable support for linking pcregrep with libbz2." ON)
114     ENDIF(BZIP2_FOUND)
115     IF(PCRE_SUPPORT_LIBBZ2)
116     INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
117     ENDIF(PCRE_SUPPORT_LIBBZ2)
118 ph10 292
119 ph10 303 # zlib
120     IF(ZLIB_FOUND)
121     OPTION (PCRE_SUPPORT_LIBZ "Enable support for linking pcregrep with libz." ON)
122     ENDIF(ZLIB_FOUND)
123     IF(PCRE_SUPPORT_LIBZ)
124     INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
125     ENDIF(PCRE_SUPPORT_LIBZ)
126 ph10 292
127 ph10 303 # readline lib
128     IF(READLINE_FOUND)
129     OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON)
130     ENDIF(READLINE_FOUND)
131     IF(PCRE_SUPPORT_LIBREADLINE)
132     INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR})
133     ENDIF(PCRE_SUPPORT_LIBREADLINE)
134 ph10 291
135 ph10 137 # Prepare build configuration
136    
137     SET(pcre_have_type_traits 0)
138     SET(pcre_have_bits_type_traits 0)
139    
140     IF(HAVE_TYPE_TRAITS_H)
141     SET(pcre_have_type_traits 1)
142     ENDIF(HAVE_TYPE_TRAITS_H)
143    
144     IF(HAVE_BITS_TYPE_TRAITS_H)
145     SET(pcre_have_bits_type_traits 1)
146     ENDIF(HAVE_BITS_TYPE_TRAITS_H)
147    
148     SET(pcre_have_long_long 0)
149     SET(pcre_have_ulong_long 0)
150    
151     IF(HAVE_LONG_LONG)
152     SET(pcre_have_long_long 1)
153     ENDIF(HAVE_LONG_LONG)
154    
155     IF(HAVE_UNSIGNED_LONG_LONG)
156     SET(pcre_have_ulong_long 1)
157     ENDIF(HAVE_UNSIGNED_LONG_LONG)
158    
159 ph10 144 IF(NOT BUILD_SHARED_LIBS)
160     SET(PCRE_STATIC 1)
161     ENDIF(NOT BUILD_SHARED_LIBS)
162    
163 ph10 258 IF(PCRE_SUPPORT_BSR_ANYCRLF)
164     SET(BSR_ANYCRLF 1)
165     ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
166    
167 ph10 137 IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)
168     SET(SUPPORT_UTF8 1)
169     ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)
170    
171     IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
172     SET(SUPPORT_UCP 1)
173     ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)
174    
175 ph10 291 IF(PCRE_SUPPORT_LIBREADLINE)
176     SET(SUPPORT_LIBREADLINE 1)
177 ph10 303 SET(PCRETEST_LIBS ${READLINE_LIBRARY})
178 ph10 291 ENDIF(PCRE_SUPPORT_LIBREADLINE)
179    
180     IF(PCRE_SUPPORT_LIBZ)
181     SET(SUPPORT_LIBZ 1)
182 ph10 303 SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})
183 ph10 291 ENDIF(PCRE_SUPPORT_LIBZ)
184    
185     IF(PCRE_SUPPORT_LIBBZ2)
186     SET(SUPPORT_LIBBZ2 1)
187 ph10 303 SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${BZIP2_LIBRARIES})
188 ph10 292 ENDIF(PCRE_SUPPORT_LIBBZ2)
189 ph10 291
190 ph10 144 SET(NEWLINE "")
191    
192 ph10 137 IF(PCRE_NEWLINE STREQUAL "LF")
193 ph10 144 SET(NEWLINE "10")
194     ENDIF(PCRE_NEWLINE STREQUAL "LF")
195     IF(PCRE_NEWLINE STREQUAL "CR")
196     SET(NEWLINE "13")
197     ENDIF(PCRE_NEWLINE STREQUAL "CR")
198     IF(PCRE_NEWLINE STREQUAL "CRLF")
199     SET(NEWLINE "3338")
200     ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
201     IF(PCRE_NEWLINE STREQUAL "ANY")
202 ph10 137 SET(NEWLINE "-1")
203 ph10 144 ENDIF(PCRE_NEWLINE STREQUAL "ANY")
204 ph10 258 IF(PCRE_NEWLINE STREQUAL "ANYCRLF")
205     SET(NEWLINE "-2")
206     ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF")
207 ph10 144
208     IF(NEWLINE STREQUAL "")
209 ph10 258 MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")
210 ph10 144 ENDIF(NEWLINE STREQUAL "")
211 ph10 137
212     IF(PCRE_EBCDIC)
213     SET(EBCDIC 1)
214     ENDIF(PCRE_EBCDIC)
215    
216     IF(PCRE_NO_RECURSE)
217     SET(NO_RECURSE 1)
218     ENDIF(PCRE_NO_RECURSE)
219    
220     # Output files
221    
222     CONFIGURE_FILE(config-cmake.h.in
223     ${CMAKE_BINARY_DIR}/config.h
224     @ONLY)
225    
226     CONFIGURE_FILE(pcre.h.generic
227     ${CMAKE_BINARY_DIR}/pcre.h
228     COPYONLY)
229    
230     # What about pcre-config and libpcre.pc?
231    
232     IF(PCRE_BUILD_PCRECPP)
233     CONFIGURE_FILE(pcre_stringpiece.h.in
234 ph10 140 ${CMAKE_BINARY_DIR}/pcre_stringpiece.h
235     @ONLY)
236 ph10 137
237     CONFIGURE_FILE(pcrecpparg.h.in
238 ph10 140 ${CMAKE_BINARY_DIR}/pcrecpparg.h
239     @ONLY)
240 ph10 137 ENDIF(PCRE_BUILD_PCRECPP)
241    
242     # Character table generation
243    
244 ph10 303 OPTION(PCRE_REBUILD_CHARTABLES "Rebuild char tables" OFF)
245     IF(PCRE_REBUILD_CHARTABLES)
246     ADD_EXECUTABLE(dftables dftables.c)
247 ph10 137
248 ph10 303 GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION)
249 ph10 137
250 ph10 303 ADD_CUSTOM_COMMAND(
251     COMMENT "Generating character tables (pcre_chartables.c) for current locale"
252     DEPENDS dftables
253     COMMAND ${DFTABLES_EXE}
254     ARGS ${CMAKE_BINARY_DIR}/pcre_chartables.c
255     OUTPUT ${CMAKE_BINARY_DIR}/pcre_chartables.c
256     )
257     ELSE(PCRE_REBUILD_CHARTABLES)
258     CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/pcre_chartables.c.dist
259     ${CMAKE_BINARY_DIR}/pcre_chartables.c
260     COPYONLY)
261     ENDIF(PCRE_REBUILD_CHARTABLES)
262 ph10 137
263     # Source code
264    
265     SET(PCRE_HEADERS ${CMAKE_BINARY_DIR}/pcre.h)
266    
267     SET(PCRE_SOURCES
268 ph10 303 ${CMAKE_BINARY_DIR}/pcre_chartables.c
269     pcre_compile.c
270     pcre_config.c
271     pcre_dfa_exec.c
272     pcre_exec.c
273     pcre_fullinfo.c
274     pcre_get.c
275     pcre_globals.c
276     pcre_info.c
277     pcre_newline.c
278     pcre_maketables.c
279     pcre_ord2utf8.c
280     pcre_refcount.c
281     pcre_study.c
282     pcre_tables.c
283     pcre_try_flipped.c
284     pcre_ucp_searchfuncs.c
285     pcre_valid_utf8.c
286     pcre_version.c
287     pcre_xclass.c
288 ph10 137 )
289    
290     SET(PCREPOSIX_HEADERS pcreposix.h)
291    
292     SET(PCREPOSIX_SOURCES pcreposix.c)
293    
294     SET(PCRECPP_HEADERS
295 ph10 303 pcrecpp.h
296     pcre_scanner.h
297     ${CMAKE_BINARY_DIR}/pcrecpparg.h
298     ${CMAKE_BINARY_DIR}/pcre_stringpiece.h
299 ph10 137 )
300    
301     SET(PCRECPP_SOURCES
302     pcrecpp.cc
303     pcre_scanner.cc
304     pcre_stringpiece.cc
305     )
306    
307     # Build setup
308    
309     ADD_DEFINITIONS(-DHAVE_CONFIG_H)
310    
311 ph10 303 IF(MSVC)
312 ph10 137 ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
313 ph10 303 ENDIF(MSVC)
314 ph10 137
315     SET(CMAKE_INCLUDE_CURRENT_DIR 1)
316 ph10 303 # needed to make sure to not link debug libs
317     # against release libs and vice versa
318     IF(WIN32)
319     SET(CMAKE_DEBUG_POSTFIX "d")
320     ENDIF(WIN32)
321 ph10 137
322     # Libraries
323    
324 ph10 303 ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${CMAKE_BINARY_DIR}/config.h)
325 ph10 137 ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})
326     TARGET_LINK_LIBRARIES(pcreposix pcre)
327    
328 ph10 311 IF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)
329     SET_TARGET_PROPERTIES(pcre pcreposix
330     PROPERTIES PREFIX ""
331     )
332     ENDIF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)
333    
334     IF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)
335     SET_TARGET_PROPERTIES(pcre pcreposix
336     PROPERTIES SUFFIX "-0.dll"
337     )
338     ENDIF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)
339    
340 ph10 137 IF(PCRE_BUILD_PCRECPP)
341 ph10 303 ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
342     TARGET_LINK_LIBRARIES(pcrecpp pcre)
343 ph10 311 IF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)
344     SET_TARGET_PROPERTIES(pcrecpp
345     PROPERTIES PREFIX ""
346     )
347     ENDIF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)
348     IF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)
349     SET_TARGET_PROPERTIES(pcrecpp
350     PROPERTIES SUFFIX "-0.dll"
351     )
352     ENDIF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)
353    
354 ph10 137 ENDIF(PCRE_BUILD_PCRECPP)
355    
356     # Executables
357    
358     ADD_EXECUTABLE(pcretest pcretest.c)
359 ph10 291 TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})
360 ph10 137
361     ADD_EXECUTABLE(pcregrep pcregrep.c)
362 ph10 291 TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})
363 ph10 137
364 ph10 303 ADD_EXECUTABLE(pcredemo pcredemo.c)
365     TARGET_LINK_LIBRARIES(pcredemo pcreposix)
366     IF(NOT BUILD_SHARED_LIBS)
367     # make sure to not use declspec(dllimport) in static mode on windows
368     SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")
369     ENDIF(NOT BUILD_SHARED_LIBS)
370    
371 ph10 144 IF(PCRE_BUILD_PCRECPP)
372     ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)
373     TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp)
374 ph10 311 IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
375     SET_TARGET_PROPERTIES(pcrecpp
376     PROPERTIES PREFIX ""
377     )
378     ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
379 ph10 144
380 ph10 311
381 ph10 144 ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)
382     TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)
383    
384     ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc)
385     TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp)
386     ENDIF(PCRE_BUILD_PCRECPP)
387    
388 ph10 137 # Testing
389    
390     ENABLE_TESTING()
391    
392 ph10 144 GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION)
393     GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION)
394    
395     # Write out a CTest configuration file that sets some needed environment
396     # variables for the test scripts.
397     #
398     FILE(WRITE ${CMAKE_BINARY_DIR}/CTestCustom.ctest
399     "# This is a generated file.
400     SET(ENV{srcdir} ${CMAKE_SOURCE_DIR})
401     SET(ENV{pcregrep} ${PCREGREP_EXE})
402     SET(ENV{pcretest} ${PCRETEST_EXE})
403     ")
404    
405 ph10 137 IF(UNIX)
406 ph10 199 ADD_TEST(pcre_test ${CMAKE_SOURCE_DIR}/RunTest)
407 ph10 144 ADD_TEST(pcre_grep_test ${CMAKE_SOURCE_DIR}/RunGrepTest)
408 ph10 137 ENDIF(UNIX)
409 ph10 144 IF(WIN32)
410     ADD_TEST(pcre_test cmd /C ${CMAKE_SOURCE_DIR}/RunTest.bat)
411     ENDIF(WIN32)
412 ph10 137
413 ph10 144 GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE
414     pcrecpp_unittest
415     DEBUG_LOCATION)
416    
417     GET_TARGET_PROPERTY(PCRE_SCANNER_UNITTEST_EXE
418     pcre_scanner_unittest
419     DEBUG_LOCATION)
420    
421     GET_TARGET_PROPERTY(PCRE_STRINGPIECE_UNITTEST_EXE
422     pcre_stringpiece_unittest
423     DEBUG_LOCATION)
424    
425     ADD_TEST(pcrecpp_test ${PCRECPP_UNITTEST_EXE})
426     ADD_TEST(pcre_scanner_test ${PCRE_SCANNER_UNITTEST_EXE})
427     ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE})
428    
429 ph10 137 # Installation
430    
431     SET(CMAKE_INSTALL_ALWAYS 1)
432    
433     INSTALL(TARGETS pcre pcreposix pcregrep pcretest
434     RUNTIME DESTINATION bin
435     LIBRARY DESTINATION lib
436     ARCHIVE DESTINATION lib)
437    
438     INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include)
439    
440     FILE(GLOB html ${CMAKE_SOURCE_DIR}/doc/html/*.html)
441     FILE(GLOB man1 ${CMAKE_SOURCE_DIR}/doc/*.1)
442     FILE(GLOB man3 ${CMAKE_SOURCE_DIR}/doc/*.3)
443    
444     IF(PCRE_BUILD_PCRECPP)
445 ph10 200 INSTALL(TARGETS pcrecpp
446 ph10 258 RUNTIME DESTINATION bin
447     LIBRARY DESTINATION lib
448     ARCHIVE DESTINATION lib)
449 ph10 137 INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include)
450     ELSE(PCRE_BUILD_PCRECPP)
451     # Remove pcrecpp.3
452     FOREACH(man ${man3})
453     GET_FILENAME_COMPONENT(man_tmp ${man} NAME)
454     IF(NOT man_tmp STREQUAL "pcrecpp.3")
455     SET(man3_new ${man3} ${man})
456     ENDIF(NOT man_tmp STREQUAL "pcrecpp.3")
457     ENDFOREACH(man ${man3})
458     SET(man3 ${man3_new})
459     ENDIF(PCRE_BUILD_PCRECPP)
460    
461 ph10 311
462 ph10 137 INSTALL(FILES ${man1} DESTINATION man/man1)
463     INSTALL(FILES ${man3} DESTINATION man/man3)
464 ph10 199 INSTALL(FILES ${html} DESTINATION share/doc/pcre/html)
465 ph10 137
466 ph10 303 # help, only for nice output
467     IF(BUILD_SHARED_LIBS)
468     SET(BUILD_STATIC_LIBS OFF)
469     ELSE(BUILD_SHARED_LIBS)
470     SET(BUILD_STATIC_LIBS ON)
471     ENDIF(BUILD_SHARED_LIBS)
472    
473     MESSAGE(STATUS "")
474     MESSAGE(STATUS "")
475     MESSAGE(STATUS "PCRE configuration summary:")
476     MESSAGE(STATUS "")
477     MESSAGE(STATUS " Install prefix .................. : " ${CMAKE_INSTALL_PREFIX})
478     MESSAGE(STATUS " C compiler ...................... : " ${CMAKE_C_COMPILER})
479     MESSAGE(STATUS " C++ compiler .................... : " ${CMAKE_CXX_COMPILER})
480     MESSAGE(STATUS " C compiler flags ................ : " ${CMAKE_C_FLAGS}) #FIXME
481     MESSAGE(STATUS " C++ compiler flags .............. : " ${CMAKE_CXX_FLAGS}) #FIXME
482     MESSAGE(STATUS "")
483     MESSAGE(STATUS " Build C++ library ............... : " ${PCRE_BUILD_PCRECPP})
484     MESSAGE(STATUS " Enable UTF-8 support ............ : " ${PCRE_SUPPORT_UNICODE_PROPERTIES})
485     MESSAGE(STATUS " Unicode properties .............. : " ${PCRE_SUPPORT_UNICODE_PROPERTIES})
486     MESSAGE(STATUS " Newline char/sequence ........... : " ${PCRE_NEWLINE})
487     MESSAGE(STATUS " \\R matches only ANYCRLF ......... : " ${PCRE_SUPPORT_BSR_ANYCRLF})
488     MESSAGE(STATUS " EBCDIC coding ................... : " ${PCRE_EBCDIC})
489     MESSAGE(STATUS " Rebuild char tables ............. : " ${PCRE_REBUILD_CHARTABLES})
490 ph10 311 MESSAGE(STATUS " No stack recursion .............. : " ${PCRE_NO_RECURSE})
491 ph10 303 MESSAGE(STATUS " POSIX mem threshold ............. : " ${PCRE_POSIX_MALLOC_THRESHOLD})
492     MESSAGE(STATUS " Internal link size .............. : " ${PCRE_LINK_SIZE})
493     MESSAGE(STATUS " Match limit ..................... : " ${PCRE_MATCH_LIMIT})
494     MESSAGE(STATUS " Match limit recursion ........... : " ${PCRE_MATCH_LIMIT_RECURSION})
495     MESSAGE(STATUS " Build shared libs ............... : " ${BUILD_SHARED_LIBS})
496     MESSAGE(STATUS " Build static libs ............... : " ${BUILD_STATIC_LIBS})
497     IF(ZLIB_FOUND)
498     MESSAGE(STATUS " Link pcregrep with libz ......... : " ${PCRE_SUPPORT_LIBZ})
499     ELSE(ZLIB_FOUND)
500     MESSAGE(STATUS " Link pcregrep with libz ......... : zlib libraries not found!" )
501     ENDIF(ZLIB_FOUND)
502     IF(BZIP2_FOUND)
503     MESSAGE(STATUS " Link pcregrep with libbz2 ....... : " ${PCRE_SUPPORT_LIBBZ2})
504     ELSE(BZIP2_FOUND)
505     MESSAGE(STATUS " Link pcregrep with libbz2 ....... : bzip2 libraries not found!" )
506     ENDIF(BZIP2_FOUND)
507     MESSAGE(STATUS " Link pcretest with libreadline .. : " ${PCRE_SUPPORT_LIBREADLINE})
508     MESSAGE(STATUS "")
509    
510 ph10 137 # end CMakeLists.txt

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12