You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
715 B

  1. #
  2. # Utility macros for Log4Cplus project
  3. #
  4. # Get Log4cplus version macro
  5. # first param - path to include folder, we will rip version from version.h
  6. macro(log4cplus_get_version _include_PATH vmajor vminor vpatch)
  7. file(STRINGS "${_include_PATH}/log4cplus/version.h" _log4cplus_VER_STRING_AUX REGEX ".*#define[ ]+LOG4CPLUS_VERSION[ ]+")
  8. string(REGEX MATCHALL "[0-9]+" _log4clpus_VER_LIST "${_log4cplus_VER_STRING_AUX}")
  9. list(LENGTH _log4clpus_VER_LIST _log4cplus_VER_LIST_LEN)
  10. # we also count '4' from the name...
  11. if(_log4cplus_VER_LIST_LEN EQUAL 5)
  12. list(GET _log4clpus_VER_LIST 2 ${vmajor})
  13. list(GET _log4clpus_VER_LIST 3 ${vminor})
  14. list(GET _log4clpus_VER_LIST 4 ${vpatch})
  15. endif()
  16. endmacro()