2f1ff84119
Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case.
10 lines
452 B
CMake
10 lines
452 B
CMake
function(GetZstdLibraryVersion _header _major _minor _release)
|
|
# Read file content
|
|
file(READ ${_header} CONTENT)
|
|
|
|
string(REGEX MATCH ".*define ZSTD_VERSION_MAJOR *([0-9]+).*define ZSTD_VERSION_MINOR *([0-9]+).*define ZSTD_VERSION_RELEASE *([0-9]+)" VERSION_REGEX "${CONTENT}")
|
|
set(${_major} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
|
set(${_minor} ${CMAKE_MATCH_2} PARENT_SCOPE)
|
|
set(${_release} ${CMAKE_MATCH_3} PARENT_SCOPE)
|
|
endfunction()
|