• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1function(GetZstdLibraryVersion _header _major _minor _patch)
2    # Read file content
3    file(READ ${_header} CONTENT)
4
5    string(REGEX MATCH ".*define ZSTD_VERSION_MAJOR *([0-9]+).*define ZSTD_VERSION_MINOR *([0-9]+).*define ZSTD_VERSION_RELEASE *([0-9]+)" VERSION_REGEX "${CONTENT}")
6    set(${_major} ${CMAKE_MATCH_1} PARENT_SCOPE)
7    set(${_minor} ${CMAKE_MATCH_2} PARENT_SCOPE)
8    set(${_patch} ${CMAKE_MATCH_3} PARENT_SCOPE)
9endfunction()
10
11