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 committed 2019-06-20 19:14:14 +01:00
1 parent cfa8e7c83e
commit 38f0d27901
13 files changed
+42 -21

No files matched your search

+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