summaryrefslogtreecommitdiffstats
path: root/cmake/InstallVersionFile.cmake.in
diff options
context:
space:
mode:
authorManuel Bentele2020-10-23 18:13:15 +0200
committerManuel Bentele2020-10-23 18:13:15 +0200
commit588368dd2a46ddec70741c6cc87a79a0b26ee383 (patch)
tree69265caba9b1fb0ee126c142538b75fd49bbe8ee /cmake/InstallVersionFile.cmake.in
parentMove the source code of all xloop components to the common 'src' directory (diff)
downloadxloop-588368dd2a46ddec70741c6cc87a79a0b26ee383.tar.gz
xloop-588368dd2a46ddec70741c6cc87a79a0b26ee383.tar.xz
xloop-588368dd2a46ddec70741c6cc87a79a0b26ee383.zip
Add automatic generation of version and build type headers for compilation
This change replaces the static version and build type header file generation by CMake with dynamic CMake targets to generate the version file whenever a Make target is executed. Thus, there is no need anymore to reconfigure and rerun CMake after the repository version or build configuration has changed.
Diffstat (limited to 'cmake/InstallVersionFile.cmake.in')
-rw-r--r--cmake/InstallVersionFile.cmake.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/InstallVersionFile.cmake.in b/cmake/InstallVersionFile.cmake.in
new file mode 100644
index 0000000..8121c25
--- /dev/null
+++ b/cmake/InstallVersionFile.cmake.in
@@ -0,0 +1,8 @@
+#
+# AUTOGENERATED: DO NOT EDIT THIS FILE
+#
+
+if(CPACK_SOURCE_INSTALLED_DIRECTORIES AND EXISTS "@INCLUDE_VERSION_HEADER_GENERATE@")
+ file(INSTALL "@INCLUDE_VERSION_HEADER_GENERATE@"
+ DESTINATION "@INCLUDE_VERSION_HEADER_GENERATE_PREFIX@")
+endif(CPACK_SOURCE_INSTALLED_DIRECTORIES AND EXISTS "@INCLUDE_VERSION_HEADER_GENERATE@")