From 77797438bfd110f61fbf2637b48d3633bf48cb47 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Mon, 9 Nov 2015 07:29:32 -0500 Subject: [PATCH] Add standardized c project version header --- CMakeLists.txt | 6 ++++++ templates/version.h.in | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 templates/version.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt index a6b1450..44e0320 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,11 @@ configure_file ( "${PROJECT_BINARY_DIR}/README.md" ) +configure_file ( + "${PROJECT_SOURCE_DIR}/templates/version.h.in" + "${PROJECT_BINARY_DIR}/version.h" +) + # ============= # Build Targets @@ -74,6 +79,7 @@ set(src_utility_files set(header_utility_files # src/GLibFacade.h + ${PROJECT_BINARY_DIR}/version.h ) # Create a library? diff --git a/templates/version.h.in b/templates/version.h.in new file mode 100644 index 0000000..2d5f974 --- /dev/null +++ b/templates/version.h.in @@ -0,0 +1,26 @@ +/* + + version.h -- @My_Project_Title@ + + @My_Project_Copyright@ + + + @My_Project_License_Indent@ + +*/ + +/** + +@file + +@brief @My_Project_Description@ - project version header + +**/ + + +#ifndef FILE_@My_Project_Title_Caps@_VERSION_H +#define FILE_@My_Project_Title_Caps@_VERSION_H + +#define @My_Project_Title_Caps@_VERSION "@My_Project_Version@" + +#endif -- 2.40.0