From 51162f50e07bdf859e3973ca301f14dca303f01d Mon Sep 17 00:00:00 2001 From: Javier Galan Date: Thu, 15 Jun 2023 12:40:40 +0200 Subject: [PATCH 1/2] Updating version to 2.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbba077e..1d88464b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LibraryVersion "1.8") +set(LibraryVersion "2.0") add_definitions(-DLIBRARY_VERSION="${LibraryVersion}") if (CMAKE_SYSTEM_NAME MATCHES "Windows") From 608d4f3272650119199985eaf3cd197e284d58e5 Mon Sep 17 00:00:00 2001 From: Javier Galan Date: Fri, 16 Jun 2023 11:53:51 +0200 Subject: [PATCH 2/2] CMakeLists. Automatic library versioning added --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d88464b..2f0ab566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,12 @@ -set(LibraryVersion "2.0") +# Perhaps this could be a common cmake macro inside framework +execute_process( + COMMAND git describe --abbrev=0 --tags + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + OUTPUT_VARIABLE LibraryVersion + ERROR_VARIABLE gitstatuserr) + +string(REPLACE "\n" "" LibraryVersion ${LibraryVersion}) +message("Raw library version: ${LibraryVersion}") add_definitions(-DLIBRARY_VERSION="${LibraryVersion}") if (CMAKE_SYSTEM_NAME MATCHES "Windows")