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

Diff of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 311 by ph10, Wed Jan 23 17:34:58 2008 UTC revision 344 by ph10, Tue Apr 22 09:16:15 2008 UTC
# Line 15  Line 15 
15  #                PCRE_SUPPORT_LIBBZ2.  #                PCRE_SUPPORT_LIBBZ2.
16  # 2008-01-20 Brought up to date to include several new features by Christian  # 2008-01-20 Brought up to date to include several new features by Christian
17  #            Ehrlicher.  #            Ehrlicher.
18  # 2008-01-22 Sheri aded options for backward compatibility of library names when  # 2008-01-22 Sheri added options for backward compatibility of library names when
19  #            building with minGW:  #            building with minGW:
20  #            if "ON", NON_STANDARD_LIB_PREFIX causes shared libraries to  #            if "ON", NON_STANDARD_LIB_PREFIX causes shared libraries to
21  #            be built without "lib" as prefix. (The libraries will be named pcre.dll,  #            be built without "lib" as prefix. (The libraries will be named pcre.dll,
# Line 24  Line 24 
24  #            be built with suffix of "-0.dll". (The libraries will be named  #            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  #            libpcre-0.dll, libpcreposix-0.dll and libpcrecpp-0.dll - same names
26  #            built by default with Configure and Make.  #            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    
30  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
31    
# Line 43  INCLUDE(CheckIncludeFileCXX) Line 45  INCLUDE(CheckIncludeFileCXX)
45  INCLUDE(CheckFunctionExists)  INCLUDE(CheckFunctionExists)
46  INCLUDE(CheckTypeSize)  INCLUDE(CheckTypeSize)
47    
48  CHECK_INCLUDE_FILE(dirent.h         HAVE_DIRENT_H)  CHECK_INCLUDE_FILE(dirent.h     HAVE_DIRENT_H)
49  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)
50  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)
51  CHECK_INCLUDE_FILE(unistd.h         HAVE_UNISTD_H)  CHECK_INCLUDE_FILE(unistd.h     HAVE_UNISTD_H)
52  CHECK_INCLUDE_FILE(windows.h    HAVE_WINDOWS_H)  CHECK_INCLUDE_FILE(windows.h    HAVE_WINDOWS_H)
53    
54  CHECK_INCLUDE_FILE_CXX(type_traits.h            HAVE_TYPE_TRAITS_H)  CHECK_INCLUDE_FILE_CXX(type_traits.h            HAVE_TYPE_TRAITS_H)
55  CHECK_INCLUDE_FILE_CXX(bits/type_traits.h       HAVE_BITS_TYPE_TRAITS_H)  CHECK_INCLUDE_FILE_CXX(bits/type_traits.h       HAVE_BITS_TYPE_TRAITS_H)
56    
57  CHECK_FUNCTION_EXISTS(bcopy     HAVE_BCOPY)  CHECK_FUNCTION_EXISTS(bcopy     HAVE_BCOPY)
58  CHECK_FUNCTION_EXISTS(memmove   HAVE_MEMMOVE)  CHECK_FUNCTION_EXISTS(memmove   HAVE_MEMMOVE)
59  CHECK_FUNCTION_EXISTS(strerror  HAVE_STRERROR)  CHECK_FUNCTION_EXISTS(strerror  HAVE_STRERROR)
60  CHECK_FUNCTION_EXISTS(strtoll   HAVE_STRTOLL)  CHECK_FUNCTION_EXISTS(strtoll   HAVE_STRTOLL)
61  CHECK_FUNCTION_EXISTS(strtoq    HAVE_STRTOQ)  CHECK_FUNCTION_EXISTS(strtoq    HAVE_STRTOQ)
62  CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64)  CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64)
63    
64  CHECK_TYPE_SIZE("long long"             LONG_LONG)  CHECK_TYPE_SIZE("long long"             LONG_LONG)
65  CHECK_TYPE_SIZE("unsigned long long"    UNSIGNED_LONG_LONG)  CHECK_TYPE_SIZE("unsigned long long"    UNSIGNED_LONG_LONG)
66    
67  # User-configurable options  # User-configurable options
68  #  #
# Line 102  SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL Line 104  SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL
104  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
105      "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")      "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")
106    
 SET(NON_STANDARD_LIB_PREFIX OFF CACHE BOOL  
    "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  IF (MINGW)
109     "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc.")    OPTION(NON_STANDARD_LIB_PREFIX
110             "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc."
111             OFF)
112    
113      OPTION(NON_STANDARD_LIB_SUFFIX
114             "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc."
115             OFF)
116    ENDIF(MINGW)
117    
118  # bzip2 lib  # bzip2 lib
119  IF(BZIP2_FOUND)  IF(BZIP2_FOUND)
# Line 138  SET(pcre_have_type_traits 0) Line 145  SET(pcre_have_type_traits 0)
145  SET(pcre_have_bits_type_traits 0)  SET(pcre_have_bits_type_traits 0)
146    
147  IF(HAVE_TYPE_TRAITS_H)  IF(HAVE_TYPE_TRAITS_H)
148          SET(pcre_have_type_traits 1)          SET(pcre_have_type_traits 1)
149  ENDIF(HAVE_TYPE_TRAITS_H)  ENDIF(HAVE_TYPE_TRAITS_H)
150    
151  IF(HAVE_BITS_TYPE_TRAITS_H)  IF(HAVE_BITS_TYPE_TRAITS_H)
152          SET(pcre_have_bits_type_traits 1)          SET(pcre_have_bits_type_traits 1)
153  ENDIF(HAVE_BITS_TYPE_TRAITS_H)  ENDIF(HAVE_BITS_TYPE_TRAITS_H)
154    
155  SET(pcre_have_long_long 0)  SET(pcre_have_long_long 0)
156  SET(pcre_have_ulong_long 0)  SET(pcre_have_ulong_long 0)
157    
158  IF(HAVE_LONG_LONG)  IF(HAVE_LONG_LONG)
159          SET(pcre_have_long_long 1)          SET(pcre_have_long_long 1)
160  ENDIF(HAVE_LONG_LONG)  ENDIF(HAVE_LONG_LONG)
161    
162  IF(HAVE_UNSIGNED_LONG_LONG)  IF(HAVE_UNSIGNED_LONG_LONG)
163          SET(pcre_have_ulong_long 1)          SET(pcre_have_ulong_long 1)
164  ENDIF(HAVE_UNSIGNED_LONG_LONG)  ENDIF(HAVE_UNSIGNED_LONG_LONG)
165    
166  IF(NOT BUILD_SHARED_LIBS)  IF(NOT BUILD_SHARED_LIBS)
167          SET(PCRE_STATIC 1)          SET(PCRE_STATIC 1)
168  ENDIF(NOT BUILD_SHARED_LIBS)  ENDIF(NOT BUILD_SHARED_LIBS)
169    
170  IF(PCRE_SUPPORT_BSR_ANYCRLF)  IF(PCRE_SUPPORT_BSR_ANYCRLF)
171          SET(BSR_ANYCRLF 1)          SET(BSR_ANYCRLF 1)
172  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
173    
174  IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)
175          SET(SUPPORT_UTF8 1)          SET(SUPPORT_UTF8 1)
176  ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)
177    
178  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
179          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
180  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)
181    
182    # This next one used to contain
183    #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})
184    # but I was advised to add the NCURSES test as well, along with
185    # some modifications to cmake/FindReadline.cmake which should
186    # make it possible to override the default if necessary. PH
187    
188  IF(PCRE_SUPPORT_LIBREADLINE)  IF(PCRE_SUPPORT_LIBREADLINE)
189          SET(SUPPORT_LIBREADLINE 1)          SET(SUPPORT_LIBREADLINE 1)
190          SET(PCRETEST_LIBS ${READLINE_LIBRARY})          SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
191  ENDIF(PCRE_SUPPORT_LIBREADLINE)  ENDIF(PCRE_SUPPORT_LIBREADLINE)
192    
193  IF(PCRE_SUPPORT_LIBZ)  IF(PCRE_SUPPORT_LIBZ)
# Line 190  ENDIF(PCRE_SUPPORT_LIBBZ2) Line 203  ENDIF(PCRE_SUPPORT_LIBBZ2)
203  SET(NEWLINE "")  SET(NEWLINE "")
204    
205  IF(PCRE_NEWLINE STREQUAL "LF")  IF(PCRE_NEWLINE STREQUAL "LF")
206          SET(NEWLINE "10")          SET(NEWLINE "10")
207  ENDIF(PCRE_NEWLINE STREQUAL "LF")  ENDIF(PCRE_NEWLINE STREQUAL "LF")
208  IF(PCRE_NEWLINE STREQUAL "CR")  IF(PCRE_NEWLINE STREQUAL "CR")
209          SET(NEWLINE "13")          SET(NEWLINE "13")
210  ENDIF(PCRE_NEWLINE STREQUAL "CR")  ENDIF(PCRE_NEWLINE STREQUAL "CR")
211  IF(PCRE_NEWLINE STREQUAL "CRLF")  IF(PCRE_NEWLINE STREQUAL "CRLF")
212          SET(NEWLINE "3338")          SET(NEWLINE "3338")
213  ENDIF(PCRE_NEWLINE STREQUAL "CRLF")  ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
214  IF(PCRE_NEWLINE STREQUAL "ANY")  IF(PCRE_NEWLINE STREQUAL "ANY")
215          SET(NEWLINE "-1")          SET(NEWLINE "-1")
216  ENDIF(PCRE_NEWLINE STREQUAL "ANY")  ENDIF(PCRE_NEWLINE STREQUAL "ANY")
217  IF(PCRE_NEWLINE STREQUAL "ANYCRLF")  IF(PCRE_NEWLINE STREQUAL "ANYCRLF")
218          SET(NEWLINE "-2")          SET(NEWLINE "-2")
219  ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF")  ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF")
220    
221  IF(NEWLINE STREQUAL "")  IF(NEWLINE STREQUAL "")
222          MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")          MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")
223  ENDIF(NEWLINE STREQUAL "")  ENDIF(NEWLINE STREQUAL "")
224    
225  IF(PCRE_EBCDIC)  IF(PCRE_EBCDIC)
226          SET(EBCDIC 1)          SET(EBCDIC 1)
227  ENDIF(PCRE_EBCDIC)  ENDIF(PCRE_EBCDIC)
228    
229  IF(PCRE_NO_RECURSE)  IF(PCRE_NO_RECURSE)
230          SET(NO_RECURSE 1)          SET(NO_RECURSE 1)
231  ENDIF(PCRE_NO_RECURSE)  ENDIF(PCRE_NO_RECURSE)
232    
233  # Output files  # Output files
# Line 230  CONFIGURE_FILE(pcre.h.generic Line 243  CONFIGURE_FILE(pcre.h.generic
243  # What about pcre-config and libpcre.pc?  # What about pcre-config and libpcre.pc?
244    
245  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
246          CONFIGURE_FILE(pcre_stringpiece.h.in          CONFIGURE_FILE(pcre_stringpiece.h.in
247                         ${CMAKE_BINARY_DIR}/pcre_stringpiece.h                         ${CMAKE_BINARY_DIR}/pcre_stringpiece.h
248                         @ONLY)                         @ONLY)
249    
250          CONFIGURE_FILE(pcrecpparg.h.in          CONFIGURE_FILE(pcrecpparg.h.in
251                         ${CMAKE_BINARY_DIR}/pcrecpparg.h                         ${CMAKE_BINARY_DIR}/pcrecpparg.h
252                         @ONLY)                         @ONLY)
253  ENDIF(PCRE_BUILD_PCRECPP)  ENDIF(PCRE_BUILD_PCRECPP)
254    
255  # Character table generation  # Character table generation
# Line 251  IF(PCRE_REBUILD_CHARTABLES) Line 264  IF(PCRE_REBUILD_CHARTABLES)
264      COMMENT "Generating character tables (pcre_chartables.c) for current locale"      COMMENT "Generating character tables (pcre_chartables.c) for current locale"
265      DEPENDS dftables      DEPENDS dftables
266      COMMAND ${DFTABLES_EXE}      COMMAND ${DFTABLES_EXE}
267      ARGS        ${CMAKE_BINARY_DIR}/pcre_chartables.c      ARGS        ${CMAKE_BINARY_DIR}/pcre_chartables.c
268      OUTPUT      ${CMAKE_BINARY_DIR}/pcre_chartables.c      OUTPUT      ${CMAKE_BINARY_DIR}/pcre_chartables.c
269    )    )
270  ELSE(PCRE_REBUILD_CHARTABLES)  ELSE(PCRE_REBUILD_CHARTABLES)
271    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/pcre_chartables.c.dist    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/pcre_chartables.c.dist
# Line 299  SET(PCRECPP_HEADERS Line 312  SET(PCRECPP_HEADERS
312  )  )
313    
314  SET(PCRECPP_SOURCES  SET(PCRECPP_SOURCES
315          pcrecpp.cc          pcrecpp.cc
316          pcre_scanner.cc          pcre_scanner.cc
317          pcre_stringpiece.cc          pcre_stringpiece.cc
318  )  )
319    
320  # Build setup  # Build setup
# Line 309  SET(PCRECPP_SOURCES Line 322  SET(PCRECPP_SOURCES
322  ADD_DEFINITIONS(-DHAVE_CONFIG_H)  ADD_DEFINITIONS(-DHAVE_CONFIG_H)
323    
324  IF(MSVC)  IF(MSVC)
325          ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)          ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
326  ENDIF(MSVC)  ENDIF(MSVC)
327    
328  SET(CMAKE_INCLUDE_CURRENT_DIR 1)  SET(CMAKE_INCLUDE_CURRENT_DIR 1)
# Line 320  IF(WIN32) Line 333  IF(WIN32)
333  ENDIF(WIN32)  ENDIF(WIN32)
334    
335  # Libraries  # Libraries
336    # pcre
337  ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${CMAKE_BINARY_DIR}/config.h)  ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${CMAKE_BINARY_DIR}/config.h)
338  ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})  ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})
339  TARGET_LINK_LIBRARIES(pcreposix pcre)  TARGET_LINK_LIBRARIES(pcreposix pcre)
340    IF(MINGW AND NOT PCRE_STATIC)
341  IF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)    IF(NON_STANDARD_LIB_PREFIX)
342  SET_TARGET_PROPERTIES(pcre pcreposix      SET_TARGET_PROPERTIES(pcre pcreposix
343                          PROPERTIES PREFIX ""                          PROPERTIES PREFIX ""
344  )      )
345  ENDIF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)    ENDIF(NON_STANDARD_LIB_PREFIX)
346    
347  IF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)    IF(NON_STANDARD_LIB_SUFFIX)
348  SET_TARGET_PROPERTIES(pcre pcreposix      SET_TARGET_PROPERTIES(pcre pcreposix
349                          PROPERTIES SUFFIX "-0.dll"                          PROPERTIES SUFFIX "-0.dll"
350  )      )
351  ENDIF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)    ENDIF(NON_STANDARD_LIB_SUFFIX)
352    ENDIF(MINGW AND NOT PCRE_STATIC)
353    
354    
355    # pcrecpp
356  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
357    ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})    ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
358    TARGET_LINK_LIBRARIES(pcrecpp pcre)    TARGET_LINK_LIBRARIES(pcrecpp pcre)
 IF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)  
 SET_TARGET_PROPERTIES(pcrecpp  
                         PROPERTIES PREFIX ""  
 )  
 ENDIF(MINGW AND NON_STANDARD_LIB_PREFIX AND NOT PCRE_STATIC)  
 IF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)  
 SET_TARGET_PROPERTIES(pcrecpp  
                         PROPERTIES SUFFIX "-0.dll"  
 )  
 ENDIF(MINGW AND NON_STANDARD_LIB_SUFFIX AND NOT PCRE_STATIC)  
359    
360      IF(MINGW AND NOT PCRE_STATIC)
361        IF(NON_STANDARD_LIB_PREFIX)
362          SET_TARGET_PROPERTIES(pcrecpp
363                                PROPERTIES PREFIX ""
364          )
365        ENDIF(NON_STANDARD_LIB_PREFIX)
366    
367        IF(NON_STANDARD_LIB_SUFFIX)
368          SET_TARGET_PROPERTIES(pcrecpp
369                              PROPERTIES SUFFIX "-0.dll"
370          )
371        ENDIF(NON_STANDARD_LIB_SUFFIX)
372      ENDIF(MINGW AND NOT PCRE_STATIC)
373  ENDIF(PCRE_BUILD_PCRECPP)  ENDIF(PCRE_BUILD_PCRECPP)
374    
375    
376  # Executables  # Executables
377    
378  ADD_EXECUTABLE(pcretest pcretest.c)  ADD_EXECUTABLE(pcretest pcretest.c)
# Line 361  TARGET_LINK_LIBRARIES(pcretest pcreposix Line 381  TARGET_LINK_LIBRARIES(pcretest pcreposix
381  ADD_EXECUTABLE(pcregrep pcregrep.c)  ADD_EXECUTABLE(pcregrep pcregrep.c)
382  TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})  TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})
383    
384  ADD_EXECUTABLE(pcredemo pcredemo.c)  # Removed by PH (2008-01-23) because pcredemo shouldn't really be built
385  TARGET_LINK_LIBRARIES(pcredemo pcreposix)  # automatically, and it gave trouble in some environments anyway.
386  IF(NOT BUILD_SHARED_LIBS)  # ADD_EXECUTABLE(pcredemo pcredemo.c)
387      # make sure to not use declspec(dllimport) in static mode on windows  # TARGET_LINK_LIBRARIES(pcredemo pcreposix)
388          SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")  # IF(NOT BUILD_SHARED_LIBS)
389  ENDIF(NOT BUILD_SHARED_LIBS)  #     # make sure to not use declspec(dllimport) in static mode on windows
390    #         SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")
391    # ENDIF(NOT BUILD_SHARED_LIBS)
392    
393  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
394          ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)          ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)
395          TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp)          TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp)
396  IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)  IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
397  SET_TARGET_PROPERTIES(pcrecpp  SET_TARGET_PROPERTIES(pcrecpp
398                          PROPERTIES PREFIX ""                          PROPERTIES PREFIX ""
# Line 378  SET_TARGET_PROPERTIES(pcrecpp Line 400  SET_TARGET_PROPERTIES(pcrecpp
400  ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)  ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
401    
402    
403          ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)          ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)
404          TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)          TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)
405    
406          ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc)          ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc)
407          TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp)          TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp)
408  ENDIF(PCRE_BUILD_PCRECPP)  ENDIF(PCRE_BUILD_PCRECPP)
409    
410  # Testing  # Testing
# Line 403  SET(ENV{pcretest} ${PCRETEST_EXE}) Line 425  SET(ENV{pcretest} ${PCRETEST_EXE})
425  ")  ")
426    
427  IF(UNIX)  IF(UNIX)
428          ADD_TEST(pcre_test      ${CMAKE_SOURCE_DIR}/RunTest)          ADD_TEST(pcre_test      ${CMAKE_SOURCE_DIR}/RunTest)
429          ADD_TEST(pcre_grep_test ${CMAKE_SOURCE_DIR}/RunGrepTest)          ADD_TEST(pcre_grep_test ${CMAKE_SOURCE_DIR}/RunGrepTest)
430  ENDIF(UNIX)  ENDIF(UNIX)
431  IF(WIN32)  IF(WIN32)
432          ADD_TEST(pcre_test cmd /C ${CMAKE_SOURCE_DIR}/RunTest.bat)          ADD_TEST(pcre_test cmd /C ${CMAKE_SOURCE_DIR}/RunTest.bat)
433  ENDIF(WIN32)  ENDIF(WIN32)
434    
435  GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE  GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE
# Line 442  FILE(GLOB man1 ${CMAKE_SOURCE_DIR}/doc/* Line 464  FILE(GLOB man1 ${CMAKE_SOURCE_DIR}/doc/*
464  FILE(GLOB man3 ${CMAKE_SOURCE_DIR}/doc/*.3)  FILE(GLOB man3 ${CMAKE_SOURCE_DIR}/doc/*.3)
465    
466  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
467          INSTALL(TARGETS pcrecpp          INSTALL(TARGETS pcrecpp
468                  RUNTIME DESTINATION bin                  RUNTIME DESTINATION bin
469                  LIBRARY DESTINATION lib                  LIBRARY DESTINATION lib
470                  ARCHIVE DESTINATION lib)                  ARCHIVE DESTINATION lib)
471          INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include)          INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include)
472  ELSE(PCRE_BUILD_PCRECPP)  ELSE(PCRE_BUILD_PCRECPP)
473          # Remove pcrecpp.3          # Remove pcrecpp.3
474          FOREACH(man ${man3})          FOREACH(man ${man3})
475                  GET_FILENAME_COMPONENT(man_tmp ${man} NAME)                  GET_FILENAME_COMPONENT(man_tmp ${man} NAME)
476                  IF(NOT man_tmp STREQUAL "pcrecpp.3")                  IF(NOT man_tmp STREQUAL "pcrecpp.3")
477                          SET(man3_new ${man3} ${man})                          SET(man3_new ${man3} ${man})
478                  ENDIF(NOT man_tmp STREQUAL "pcrecpp.3")                  ENDIF(NOT man_tmp STREQUAL "pcrecpp.3")
479          ENDFOREACH(man ${man3})          ENDFOREACH(man ${man3})
480          SET(man3 ${man3_new})          SET(man3 ${man3_new})
481  ENDIF(PCRE_BUILD_PCRECPP)  ENDIF(PCRE_BUILD_PCRECPP)
482    
483    
# Line 497  MESSAGE(STATUS "  Build static libs .... Line 519  MESSAGE(STATUS "  Build static libs ....
519  IF(ZLIB_FOUND)  IF(ZLIB_FOUND)
520    MESSAGE(STATUS "  Link pcregrep with libz ......... : " ${PCRE_SUPPORT_LIBZ})    MESSAGE(STATUS "  Link pcregrep with libz ......... : " ${PCRE_SUPPORT_LIBZ})
521  ELSE(ZLIB_FOUND)  ELSE(ZLIB_FOUND)
522    MESSAGE(STATUS "  Link pcregrep with libz ......... :   zlib libraries not found!" )    MESSAGE(STATUS "  Link pcregrep with libz ......... : None" )
523  ENDIF(ZLIB_FOUND)  ENDIF(ZLIB_FOUND)
524  IF(BZIP2_FOUND)  IF(BZIP2_FOUND)
525    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : " ${PCRE_SUPPORT_LIBBZ2})    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : " ${PCRE_SUPPORT_LIBBZ2})
526  ELSE(BZIP2_FOUND)  ELSE(BZIP2_FOUND)
527    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... :   bzip2 libraries not found!" )    MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : None" )
528  ENDIF(BZIP2_FOUND)  ENDIF(BZIP2_FOUND)
529  MESSAGE(STATUS "  Link pcretest with libreadline .. : " ${PCRE_SUPPORT_LIBREADLINE})  IF(NOT PCRE_SUPPORT_LIBREADLINE)
530      MESSAGE(STATUS "  Link pcretest with libreadline .. : None" )
531    ELSE(NOT PCRE_SUPPORT_LIBREADLINE)
532      MESSAGE(STATUS "  Link pcretest with libreadline .. : " ${PCRE_SUPPORT_LIBREADLINE})
533    ENDIF(NOT PCRE_SUPPORT_LIBREADLINE)
534    IF(MINGW AND NOT PCRE_STATIC)
535      MESSAGE(STATUS "  Non-standard dll names (prefix) . : " ${NON_STANDARD_LIB_PREFIX})
536      MESSAGE(STATUS "  Non-standard dll names (suffix) . : " ${NON_STANDARD_LIB_SUFFIX})
537    ENDIF(MINGW AND NOT PCRE_STATIC)
538  MESSAGE(STATUS "")  MESSAGE(STATUS "")
539    
540  # end CMakeLists.txt  # end CMakeLists.txt

Legend:
Removed from v.311  
changed lines
  Added in v.344

  ViewVC Help
Powered by ViewVC 1.1.5