/[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 863 by zherczeg, Thu Jan 12 19:19:56 2012 UTC revision 886 by ph10, Tue Jan 17 14:25:07 2012 UTC
# Line 53  Line 53 
53  # 2011-10-04 Sheri Increased minimum required cmake version  # 2011-10-04 Sheri Increased minimum required cmake version
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
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 140  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 243  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 316  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 359  SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/p Line 379  SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/p
379    
380  IF(PCRE_BUILD_PCRE8)  IF(PCRE_BUILD_PCRE8)
381  SET(PCRE_SOURCES  SET(PCRE_SOURCES
382    ${PROJECT_BINARY_DIR}/pcre_byte_order.c    pcre_byte_order.c
383    pcre_chartables.c    pcre_chartables.c
384    pcre_compile.c    pcre_compile.c
385    pcre_config.c    pcre_config.c
# Line 390  ENDIF(PCRE_BUILD_PCRE8) Line 410  ENDIF(PCRE_BUILD_PCRE8)
410    
411  IF(PCRE_BUILD_PCRE16)  IF(PCRE_BUILD_PCRE16)
412  SET(PCRE16_SOURCES  SET(PCRE16_SOURCES
   ${PROJECT_BINARY_DIR}/pcre16_byte_order.c  
413    pcre16_byte_order.c    pcre16_byte_order.c
414    pcre16_chartables.c    pcre16_chartables.c
415    pcre16_compile.c    pcre16_compile.c

Legend:
Removed from v.863  
changed lines
  Added in v.886

  ViewVC Help
Powered by ViewVC 1.1.5