/[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 864 by zherczeg, Fri Jan 13 04:58:55 2012 UTC revision 903 by ph10, Sat Jan 21 16:37:17 2012 UTC
# Line 54  Line 54 
54  # 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c  # 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c
55  # 2012-01-10 Zoltan Herczeg added libpcre16 support  # 2012-01-10 Zoltan Herczeg added libpcre16 support
56  # 2012-01-13 Stephen Kelly added out of source build support  # 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    
60  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
61    
# Line 141  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE B Line 143  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE B
143      "Enable use of Just-in-time compiling in pcregrep.")      "Enable use of Just-in-time compiling in pcregrep.")
144    
145  SET(PCRE_SUPPORT_UTF OFF CACHE BOOL  SET(PCRE_SUPPORT_UTF OFF CACHE BOOL
146      "Enable support for the Unicode Transformation Format (UTF) encoding.")      "Enable support for Unicode Transformation Format (UTF-8 and/or UTF-16) encoding.")
147    
148  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
149      "Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)")      "Enable support for Unicode properties (if set, UTF support will be enabled as well).")
   
 SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL  
     "Enable support for the Unicode UTF-8 encoding.")  
150    
151  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
152      "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")
# Line 244  IF(PCRE_SUPPORT_BSR_ANYCRLF) Line 243  IF(PCRE_SUPPORT_BSR_ANYCRLF)
243          SET(BSR_ANYCRLF 1)          SET(BSR_ANYCRLF 1)
244  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
245    
246  IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES)
247          SET(SUPPORT_UTF 1)          SET(SUPPORT_UTF 1)
248          SET(PCRE_SUPPORT_UTF ON)          SET(PCRE_SUPPORT_UTF ON)
249  ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES)
250    
251  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
252          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
# Line 317  CONFIGURE_FILE(config-cmake.h.in Line 316  CONFIGURE_FILE(config-cmake.h.in
316                 ${PROJECT_BINARY_DIR}/config.h                 ${PROJECT_BINARY_DIR}/config.h
317                 @ONLY)                 @ONLY)
318    
319  CONFIGURE_FILE(pcre.h.generic  # Parse version numbers and date out of configure.ac
320    
321    file(STRINGS ${PROJECT_SOURCE_DIR}/configure.ac
322      configure_lines
323      LIMIT_COUNT 50 # Read only the first 50 lines of the file
324    )
325    
326    set(SEARCHED_VARIABLES "pcre_major" "pcre_minor" "pcre_prerelease" "pcre_date")
327    foreach(configure_line ${configure_lines})
328        foreach(_substitution_variable ${SEARCHED_VARIABLES})
329            string(TOUPPER ${_substitution_variable} _substitution_variable_upper)
330            if (NOT ${_substitution_variable_upper})
331                string(REGEX MATCH "m4_define\\(${_substitution_variable}, \\[(.*)\\]" MACTHED_STRING ${configure_line})
332                if (CMAKE_MATCH_1)
333                    set(${_substitution_variable_upper} ${CMAKE_MATCH_1})
334                endif()
335            endif()
336        endforeach()
337    endforeach()
338    
339    CONFIGURE_FILE(pcre.h.in
340                 ${PROJECT_BINARY_DIR}/pcre.h                 ${PROJECT_BINARY_DIR}/pcre.h
341                 COPYONLY)                 @ONLY)
342    
343  # What about pcre-config and libpcre.pc?  # What about pcre-config and libpcre.pc?
344    
# Line 374  SET(PCRE_SOURCES Line 393  SET(PCRE_SOURCES
393    pcre_newline.c    pcre_newline.c
394    pcre_ord2utf8.c    pcre_ord2utf8.c
395    pcre_refcount.c    pcre_refcount.c
396    pcre_string_utils.c    pcre_string_utils.c
397    pcre_study.c    pcre_study.c
398    pcre_tables.c    pcre_tables.c
399    pcre_ucd.c    pcre_ucd.c

Legend:
Removed from v.864  
changed lines
  Added in v.903

  ViewVC Help
Powered by ViewVC 1.1.5