Move GetLibraryVersion function to its own module file
This commit is contained in:
1 parent
8013c86c7d
commit
623baf513e
2 files changed
+11
-12
No files matched your search
@@ -0,0 +1,9 @@
|
||||
function(GetLibraryVersion _header _major _minor _release)
|
||||
# Read file content
|
||||
FILE(READ ${_header} CONTENT)
|
||||
|
||||
string(REGEX MATCHALL ".*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()
|
||||
Reference in new issue
Block a user