Use configure_file in CMake to force rebuild if git commit changes

* We also only use GIT_COMMIT_HASH where necessary to avoid rebuilding many
  files for no reason, including splitting version.cpp out into a separate
  project as we do with VS since otherwise changing its preprocessor defines
  rebuilds the whole renderdoc project.
* At the same time, move the git hash to be internal only so we don't have to
  try to link version.cpp into other projects like renderdoccmd or qrenderdoc.
This commit is contained in:
baldurk
2019-06-20 13:29:55 +01:00
parent cfa8e7c83e
commit 38f0d27901
13 changed files with 42 additions and 21 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
if(parser.isSet(versionOption))
{
printf("QRenderDoc v%s (%s)\n", MAJOR_MINOR_VERSION_STRING, GitVersionHash);
printf("QRenderDoc v%s (%s)\n", MAJOR_MINOR_VERSION_STRING, RENDERDOC_GetCommitHash());
#if defined(DISTRIBUTION_VERSION)
printf("Packaged for %s - %s\n", DISTRIBUTION_NAME, DISTRIBUTION_CONTACT);
#endif