forked from Gnucash/gnucash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework version-info rules to allow building from github downloaded zi…
…p archives
- Loading branch information
Showing
3 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Create the gnc-vcs-info.h file starting from a source directory that's | ||
# - not a git working directory | ||
# - not extracted from a distribution tarball | ||
# It currently sets four parameters | ||
# - GNC_VCS_REV | ||
# - GNC_VCS_REV_DATE | ||
# - GNC_VCS_REV_YEAR | ||
# - GNC_VCS_REV_Y_M | ||
# The following environment variables are used and should be properly set | ||
# by the calling code: | ||
# - PROJECT_VERSION (should point at a bash shell or compatible) | ||
# - SRC (full path to gnc-vcs-info.h.in) | ||
# - DST (full path to destination for gnc-vcs-info.h) | ||
|
||
|
||
execute_process( | ||
COMMAND ${SHELL} "${SRC_DIR}/util/gnc-vcs-info" -r "${SRC_DIR}" | ||
OUTPUT_VARIABLE GNC_VCS_REV | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
execute_process( | ||
COMMAND ${SHELL} "${SRC_DIR}/util/gnc-vcs-info" -d "${SRC_DIR}" | ||
OUTPUT_VARIABLE GNC_VCS_REV_DATE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
string(SUBSTRING ${GNC_VCS_REV_DATE} 0 4 GNC_VCS_REV_YEAR) | ||
string(SUBSTRING ${GNC_VCS_REV_DATE} 0 7 GNC_VCS_REV_Y_M) | ||
configure_file(${SRC} ${DST} @ONLY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters