Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFormerLurker <hochgebe@gmail.com>2020-11-28 19:46:31 +0300
committerFormerLurker <hochgebe@gmail.com>2020-11-28 19:46:31 +0300
commitf89e30660e82df0d9ea2f704aafce833d413ff13 (patch)
tree5337344c06c167972af56963f50eea701d81887f /GcodeProcessorLib
parent7da85eb0a6d659885b4a16fce7a0ba15ecbe0e39 (diff)
Fix version for plugin
Diffstat (limited to 'GcodeProcessorLib')
-rw-r--r--GcodeProcessorLib/CMakeLists.txt6
-rw-r--r--GcodeProcessorLib/deploy/version.h13
-rw-r--r--GcodeProcessorLib/version.generated.h.in21
-rw-r--r--GcodeProcessorLib/version.h15
4 files changed, 37 insertions, 18 deletions
diff --git a/GcodeProcessorLib/CMakeLists.txt b/GcodeProcessorLib/CMakeLists.txt
index 52d1d3a..8cc89bf 100644
--- a/GcodeProcessorLib/CMakeLists.txt
+++ b/GcodeProcessorLib/CMakeLists.txt
@@ -51,6 +51,10 @@ configure_file(
)
include_directories("${CMAKE_BINARY_DIR}/GcodeProcessorLib/generated/")
+# copy version.h file to the source folder for later deployment
+file(COPY "${CMAKE_BINARY_DIR}/GcodeProcessorLib/version.generated.h" DESTINATION "${PROJECT_SOURCE_DIR}/deploy")
+file(RENAME "${PROJECT_SOURCE_DIR}/deploy/version.generated.h" "${PROJECT_SOURCE_DIR}/deploy/version.h")
+
option(USE_CXX_EXCEPTIONS "Enable C++ exception support" ON)
# include sourcelist.cmake, which contains our source list and exposes it as the
@@ -64,7 +68,7 @@ add_library(${PROJECT_NAME} STATIC ${GcodeProcessorLibSources})
install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib # <-- Add this line
+ LIBRARY DESTINATION lib
COMPONENT library
)
diff --git a/GcodeProcessorLib/deploy/version.h b/GcodeProcessorLib/deploy/version.h
new file mode 100644
index 0000000..b418130
--- /dev/null
+++ b/GcodeProcessorLib/deploy/version.h
@@ -0,0 +1,13 @@
+
+// In version.h.in
+#ifndef VERSION_GENERATED_H
+#define VERSION_GENERATED_H
+ #define GIT_BRANCH "devel"
+ #define GIT_COMMIT_HASH "7da85eb"
+ #define GIT_TAGGED_VERSION "0.1.0-11-g7da85eb"
+ #define GIT_TAG "0.1.0"
+ #define BUILD_DATE "2020-11-28T16:09:44Z"
+ #define COPYRIGHT_DATE "2020"
+ #define AUTHOR "Brad Hochgesang"
+#endif
+// end of version.h.in
diff --git a/GcodeProcessorLib/version.generated.h.in b/GcodeProcessorLib/version.generated.h.in
index ec3cd38..1b6066b 100644
--- a/GcodeProcessorLib/version.generated.h.in
+++ b/GcodeProcessorLib/version.generated.h.in
@@ -1,12 +1,13 @@
+
+// In version.h.in
#ifndef VERSION_GENERATED_H
-#define VERSION_GENERATED_H
+ #define VERSION_GENERATED_H
+ #define GIT_BRANCH "@GIT_BRANCH@"
+ #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
+ #define GIT_TAGGED_VERSION "@GIT_TAGGED_VERSION@"
+ #define GIT_TAG "@GIT_TAG@"
+ #define BUILD_DATE "@BUILD_DATE@"
+ #define COPYRIGHT_DATE "@BUILD_YEAR@"
+ #define AUTHOR "Brad Hochgesang"
#endif
-
-#define GIT_BRANCH "@GIT_BRANCH@"
-#define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
-#define GIT_TAGGED_VERSION "@GIT_TAGGED_VERSION@"
-#define GIT_TAG "@GIT_TAG@"
-#define BUILD_DATE "@BUILD_DATE@"
-#define COPYRIGHT_DATE "@BUILD_YEAR@"
-#define AUTHOR "Brad Hochgesang"
-
+// end of version.h.in \ No newline at end of file
diff --git a/GcodeProcessorLib/version.h b/GcodeProcessorLib/version.h
index 9226f12..5653329 100644
--- a/GcodeProcessorLib/version.h
+++ b/GcodeProcessorLib/version.h
@@ -1,14 +1,15 @@
#ifndef VERSION_H
#define VERSION_H
#ifndef HAS_GENERATED_VERSION
- #define GIT_BRANCH "Unknown"
- #define GIT_COMMIT_HASH "Unknown"
- #define GIT_TAGGED_VERSION "Unknown"
- #define GIT_TAG "Unknown"
- #define BUILD_DATE "Unknown"
- #define COPYRIGHT_DATE "2020"
- #define AUTHOR "Brad Hochgesang"
+ #define GIT_BRANCH "Unknown"
+ #define GIT_COMMIT_HASH "Unknown"
+ #define GIT_TAGGED_VERSION "Unknown"
+ #define GIT_TAG "Unknown"
+ #define BUILD_DATE "Unknown"
+ #define COPYRIGHT_DATE "2020"
+ #define AUTHOR "Brad Hochgesang"
#else
#include "version.generated.h"
+
#endif
#endif \ No newline at end of file