retro-imager/dependencies/zstd-1.5.0/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake
Floris Bos 67618a2eac Bump bundled libarchive version to 3.5.2
- Update bunlded libarchive version used on Windows/Mac
- Enable requested zstd support while we are at it. Closes #211
2021-12-09 12:22:14 +01:00

10 lines
449 B
CMake

function(GetZstdLibraryVersion _header _major _minor _patch)
# 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(${_patch} ${CMAKE_MATCH_3} PARENT_SCOPE)
endfunction()