/[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 865 by ph10, Fri Jan 13 11:28:41 2012 UTC revision 886 by ph10, Tue Jan 17 14:25:07 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 314  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    

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

  ViewVC Help
Powered by ViewVC 1.1.5