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.
gnucash/cmake/version-info2env.cmake

14 lines
504 B

# Extract the parameters set in _VCS_INFO_FILE and export them as environment variables
# _VCS_INFO_FILE should be the full path to gnc-vcs-info.h
function (versioninfo2env _VCS_INFO_FILE)
file(STRINGS ${_VCS_INFO_FILE} lines REGEX "#define")
foreach(line ${lines})
string(REGEX REPLACE "^.* (.*) \"(.*)\"" "\\1;\\2" _param_val ${line})
list(GET _param_val 0 _param)
list(GET _param_val 1 _val)
set(${_param} ${_val} PARENT_SCOPE)
endforeach()
endfunction()