/[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 290 by ph10, Wed Sep 19 09:27:50 2007 UTC revision 291 by ph10, Wed Dec 26 18:46:46 2007 UTC
# Line 8  Line 8 
8  # Refined and expanded by Daniel Richard G. <skunk@iSKUNK.ORG>  # 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  # 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  # 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  #  #
17    
18  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
# Line 26  CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_ Line 31  CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_
31  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)
32  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)
33    
34    CHECK_INCLUDE_FILE(bzlib.h      HAVE_BZLIB_H)
35    CHECK_INCLUDE_FILE(zlib.h       HAVE_ZLIB_H)
36    CHECK_INCLUDE_FILE(readline/history.h  HAVE_READLINE_HISTORY_H)
37    CHECK_INCLUDE_FILE(readline/readline.h HAVE_READLINE_READLINE_H)
38    
39  CHECK_INCLUDE_FILE_CXX(type_traits.h            HAVE_TYPE_TRAITS_H)  CHECK_INCLUDE_FILE_CXX(type_traits.h            HAVE_TYPE_TRAITS_H)
40  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)
41    
# Line 76  SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL Line 86  SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL
86  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
87      "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")
88    
89    SET(PCRE_SUPPORT_LIBBZ2 OFF CACHE BOOL
90        "Enable support for linking pcregrep with libbz2.")
91    
92    SET (PCRE_SUPPORT_LIBZ OFF CACHE BOOL
93        "Enable support for linking pcregrep with libz.")
94    
95    SET (PCRE_SUPPORT_LIBREADLINE OFF CACHE BOOL
96        "Enable support for linking pcretest with libreadline.")
97    
98  # Prepare build configuration  # Prepare build configuration
99    
100  SET(pcre_have_type_traits 0)  SET(pcre_have_type_traits 0)
# Line 116  IF(PCRE_SUPPORT_UNICODE_PROPERTIES) Line 135  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
135          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
136  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)
137    
138    IF(PCRE_SUPPORT_LIBREADLINE)
139            SET(SUPPORT_LIBREADLINE 1)
140            SET(PCRETEST_LIBS readline)
141    ENDIF(PCRE_SUPPORT_LIBREADLINE)
142    
143    IF(PCRE_SUPPORT_LIBZ)
144            SET(SUPPORT_LIBZ 1)
145            SET(PCREGREP_LIBS z)
146    ENDIF(PCRE_SUPPORT_LIBZ)
147    
148    IF(PCRE_SUPPORT_LIBBZ2)
149            SET(SUPPORT_LIBBZ2 1)
150            SET(PCREGREP_LIBS ${PCREGREP_LIBS} bz2)
151    ENDIF(PCRE_SUPPORT_LIBBZ2)
152    
153  SET(NEWLINE "")  SET(NEWLINE "")
154    
155  IF(PCRE_NEWLINE STREQUAL "LF")  IF(PCRE_NEWLINE STREQUAL "LF")
# Line 245  ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_ Line 279  ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_
279  ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})  ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})
280  TARGET_LINK_LIBRARIES(pcreposix pcre)  TARGET_LINK_LIBRARIES(pcreposix pcre)
281    
282    IF(NOT UNIX)
283  SET_TARGET_PROPERTIES(pcre pcreposix  SET_TARGET_PROPERTIES(pcre pcreposix
284                          PROPERTIES PREFIX ""                          PROPERTIES PREFIX ""
285  )  )
286    ENDIF(NOT UNIX)
287    
288  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
289          ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})          ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
# Line 260  ENDIF(PCRE_BUILD_PCRECPP) Line 296  ENDIF(PCRE_BUILD_PCRECPP)
296  # Executables  # Executables
297    
298  ADD_EXECUTABLE(pcretest pcretest.c)  ADD_EXECUTABLE(pcretest pcretest.c)
299  TARGET_LINK_LIBRARIES(pcretest pcreposix)  TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})
300    
301  ADD_EXECUTABLE(pcregrep pcregrep.c)  ADD_EXECUTABLE(pcregrep pcregrep.c)
302  TARGET_LINK_LIBRARIES(pcregrep pcreposix)  TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})
303    
304  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
305          ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)          ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)

Legend:
Removed from v.290  
changed lines
  Added in v.291

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12