aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-02-07 15:00:30 +0100
committerSven Gothel <[email protected]>2022-02-07 15:00:30 +0100
commit9983491e49050bf93cb389e4ff9b8157e5a7ae7e (patch)
tree60281ea9d2fbd8d76650bd89f2c08754cbe9470c
parentef5d514d9736c5e8f020aa0c30edcc20712145c2 (diff)
Adopt jaulib detailed git version info: Using VERSION_COMMITS and VERSION_SHA1_SHORT. VERSION_LONG reflects post-tag and dirty.
-rw-r--r--CMakeLists.txt18
-rw-r--r--Doxyfile.cpp.in2
-rw-r--r--Doxyfile.java.in2
-rw-r--r--cmake/modules/version.c.in6
-rw-r--r--java/jni/direct_bt/CMakeLists.txt4
-rw-r--r--java/manifest.txt.in10
-rw-r--r--java_fat/CMakeLists.txt4
-rw-r--r--java_fat/manifest-fat.txt.in10
-rw-r--r--src/direct_bt/CMakeLists.txt4
-rw-r--r--src/direct_bt/direct_bt.pc.cmake2
-rw-r--r--test/java/manifest.txt.in10
-rw-r--r--trial/java/manifest.txt.in10
12 files changed, 44 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61df04c9..fd484e69 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,15 +19,21 @@ endif(BUILD_TRIAL)
include(jaulib/JaulibSetup.cmake)
JaulibSetup()
+# this is the library version, derived from git tag and revision
+set (direct_bt_VERSION_MAJOR ${VERSION_MAJOR})
+set (direct_bt_VERSION_MINOR ${VERSION_MINOR})
+set (direct_bt_VERSION_PATCH ${VERSION_PATCH})
+set (direct_bt_VERSION_COMMITS ${VERSION_COMMITS})
+set (direct_bt_VERSION_SHA1 ${VERSION_SHA1})
+set (direct_bt_VERSION_SHA1_SHORT ${VERSION_SHA1_SHORT})
+set (direct_bt_GIT_DIRTY ${GIT_WORKDIR_DIRTY})
+set (direct_bt_VERSION_LONG ${VERSION_LONG})
+set (direct_bt_VERSION_SHORT ${VERSION_SHORT})
+set (direct_bt_VERSION_API ${VERSION_API})
+
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/version.c.in
${CMAKE_CURRENT_BINARY_DIR}/src/version.c)
-# this is the library version, independant of git revision
-set (direct_bt_VERSION_MAJOR ${VERSION_MAJOR})
-set (direct_bt_VERSION_MINOR ${VERSION_MINOR})
-set (direct_bt_VERSION_PATCH ${VERSION_PATCH})
-set (direct_bt_VERSION_STRING "${direct_bt_VERSION_MAJOR}.${direct_bt_VERSION_MINOR}.${direct_bt_VERSION_PATCH}")
-
set (CMAKE_SWIG_FLAGS "")
set (direct_bt_DOCS_DIR documentation)
diff --git a/Doxyfile.cpp.in b/Doxyfile.cpp.in
index 57ef577c..092239a9 100644
--- a/Doxyfile.cpp.in
+++ b/Doxyfile.cpp.in
@@ -38,7 +38,7 @@ PROJECT_NAME = "Direct-BT"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = @direct_bt_VERSION_STRING@
+PROJECT_NUMBER = v@direct_bt_VERSION_LONG@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/Doxyfile.java.in b/Doxyfile.java.in
index b2c5b478..24ce0732 100644
--- a/Doxyfile.java.in
+++ b/Doxyfile.java.in
@@ -38,7 +38,7 @@ PROJECT_NAME = "Direct-BT"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = @direct_bt_VERSION_STRING@
+PROJECT_NUMBER = v@direct_bt_VERSION_LONG@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/cmake/modules/version.c.in b/cmake/modules/version.c.in
index 0400a6c0..03a464ce 100644
--- a/cmake/modules/version.c.in
+++ b/cmake/modules/version.c.in
@@ -1,5 +1,5 @@
#include <direct_bt/version.h>
-const char* DIRECT_BT_VERSION = "@VERSION@";
-const char* DIRECT_BT_VERSION_SHORT = "@VERSION_SHORT@";
-const char* DIRECT_BT_VERSION_API = "@VERSION_API@";
+const char* DIRECT_BT_VERSION = "@direct_bt_VERSION_LONG@";
+const char* DIRECT_BT_VERSION_SHORT = "@direct_bt_VERSION_SHORT@";
+const char* DIRECT_BT_VERSION_API = "@direct_bt_VERSION_API@";
diff --git a/java/jni/direct_bt/CMakeLists.txt b/java/jni/direct_bt/CMakeLists.txt
index cda33582..4ff0affa 100644
--- a/java/jni/direct_bt/CMakeLists.txt
+++ b/java/jni/direct_bt/CMakeLists.txt
@@ -45,7 +45,7 @@ target_link_libraries(javadirect_bt ${JNI_LIBRARIES} direct_bt)
if(USE_STRIP)
add_custom_command(TARGET javadirect_bt POST_BUILD
- COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}javadirect_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_STRING}
+ COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}javadirect_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_SHORT}
COMMENT "stripping javadirect_bt"
VERBATIM
)
@@ -55,7 +55,7 @@ set_target_properties(
javadirect_bt
PROPERTIES
SOVERSION ${direct_bt_VERSION_MAJOR}
- VERSION ${direct_bt_VERSION_STRING}
+ VERSION ${direct_bt_VERSION_SHORT}
)
install(TARGETS javadirect_bt LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/java/manifest.txt.in b/java/manifest.txt.in
index c1ae4024..4d102f4c 100644
--- a/java/manifest.txt.in
+++ b/java/manifest.txt.in
@@ -3,19 +3,19 @@ Bundle-Date: @BUILD_TSTAMP@
Bundle-ManifestVersion: 2
Bundle-Name: org.direct_bt
Bundle-SymbolicName: org.direct_bt
-Bundle-Version: @VERSION_SHORT@
+Bundle-Version: @direct_bt_VERSION_SHORT@
Export-Package: org.direct_bt
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.9))"
Package-Title: org.direct_bt
Package-Vendor: Gothel Software
-Package-Version: @VERSION_SHORT@
+Package-Version: @direct_bt_VERSION_SHORT@
Specification-Title: Direct-BT
Specification-Vendor: Gothel Software
-Specification-Version: @VERSION_API@
+Specification-Version: @direct_bt_VERSION_API@
Implementation-Title: Direct-BT
Implementation-Vendor: Gothel Software
-Implementation-Version: @VERSION@
-Implementation-Commit: @VERSION_SHA1@
+Implementation-Version: @direct_bt_VERSION_LONG@
+Implementation-Commit: @direct_bt_VERSION_SHA1@
Implementation-URL: http://www.jausoft.com/
Extension-Name: org.direct_bt
Trusted-Library: true
diff --git a/java_fat/CMakeLists.txt b/java_fat/CMakeLists.txt
index 11d4c02c..4a3b87ef 100644
--- a/java_fat/CMakeLists.txt
+++ b/java_fat/CMakeLists.txt
@@ -18,13 +18,13 @@ add_custom_command (OUTPUT ${direct_bt_fat_jar_file} ${direct_bt_java_src_file}
COMMAND ${CMAKE_COMMAND}
-D_srcdir=${CMAKE_CURRENT_BINARY_DIR}/../src/direct_bt
-D_dstdir=${CMAKE_CURRENT_BINARY_DIR}/natives/${OS_AND_ARCH}
- -D_srcbasename=${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_STRING}
+ -D_srcbasename=${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_SHORT}
-D_dstbasename=${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}
-P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/FileCopyS2D.cmake
COMMAND ${CMAKE_COMMAND}
-D_srcdir=${CMAKE_CURRENT_BINARY_DIR}/../java/jni/direct_bt
-D_dstdir=${CMAKE_CURRENT_BINARY_DIR}/natives/${OS_AND_ARCH}
- -D_srcbasename=${CMAKE_SHARED_LIBRARY_PREFIX}javadirect_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_STRING}
+ -D_srcbasename=${CMAKE_SHARED_LIBRARY_PREFIX}javadirect_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_SHORT}
-D_dstbasename=${CMAKE_SHARED_LIBRARY_PREFIX}javadirect_bt${CMAKE_SHARED_LIBRARY_SUFFIX}
-P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/FileCopyS2D.cmake
COMMAND ${CMAKE_COMMAND}
diff --git a/java_fat/manifest-fat.txt.in b/java_fat/manifest-fat.txt.in
index 5ec719ed..533d2049 100644
--- a/java_fat/manifest-fat.txt.in
+++ b/java_fat/manifest-fat.txt.in
@@ -3,19 +3,19 @@ Bundle-Date: @BUILD_TSTAMP@
Bundle-ManifestVersion: 2
Bundle-Name: org.direct_bt
Bundle-SymbolicName: org.direct_bt
-Bundle-Version: @VERSION_SHORT@
+Bundle-Version: @direct_bt_VERSION_SHORT@
Export-Package: org.direct_bt
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.9))"
Package-Title: org.direct_bt
Package-Vendor: Gothel Software
-Package-Version: @VERSION_SHORT@
+Package-Version: @direct_bt_VERSION_SHORT@
Specification-Title: Direct-BT Jaulib Fat
Specification-Vendor: Gothel Software
-Specification-Version: @VERSION_API@
+Specification-Version: @direct_bt_VERSION_API@
Implementation-Title: Direct-BT Jaulib Fat
Implementation-Vendor: Gothel Software
-Implementation-Version: @VERSION@
-Implementation-Commit: @VERSION_SHA1@
+Implementation-Version: @direct_bt_VERSION_LONG@
+Implementation-Commit: @direct_bt_VERSION_SHA1@
Implementation-URL: http://www.jausoft.com/
Extension-Name: org.direct_bt
Trusted-Library: true
diff --git a/src/direct_bt/CMakeLists.txt b/src/direct_bt/CMakeLists.txt
index 0728923a..fa804703 100644
--- a/src/direct_bt/CMakeLists.txt
+++ b/src/direct_bt/CMakeLists.txt
@@ -56,7 +56,7 @@ target_link_libraries (
if(USE_STRIP)
add_custom_command(TARGET direct_bt POST_BUILD
- COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_STRING}
+ COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}direct_bt${CMAKE_SHARED_LIBRARY_SUFFIX}.${direct_bt_VERSION_SHORT}
COMMENT "stripping direct_bt"
VERBATIM
)
@@ -66,7 +66,7 @@ set_target_properties(
direct_bt
PROPERTIES
SOVERSION ${direct_bt_VERSION_MAJOR}
- VERSION ${direct_bt_VERSION_STRING}
+ VERSION ${direct_bt_VERSION_SHORT}
)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/api/direct_bt/ DESTINATION include/direct_bt)
diff --git a/src/direct_bt/direct_bt.pc.cmake b/src/direct_bt/direct_bt.pc.cmake
index 5285b17d..99fdb6c3 100644
--- a/src/direct_bt/direct_bt.pc.cmake
+++ b/src/direct_bt/direct_bt.pc.cmake
@@ -5,7 +5,7 @@ includedir=${prefix}/include/direct_bt
Name: direct_bt
Description: Direct-BT LE and BREDR library
-Version: @direct_bt_VERSION_STRING@
+Version: @direct_bt_VERSION_LONG@
Libs: -L${libdir} -ldirect_bt
Cflags: -I${includedir}
diff --git a/test/java/manifest.txt.in b/test/java/manifest.txt.in
index 21590365..1c78f828 100644
--- a/test/java/manifest.txt.in
+++ b/test/java/manifest.txt.in
@@ -3,19 +3,19 @@ Bundle-Date: @BUILD_TSTAMP@
Bundle-ManifestVersion: 2
Bundle-Name: org.direct_bt.test
Bundle-SymbolicName: org.direct_bt.test
-Bundle-Version: @VERSION_SHORT@
+Bundle-Version: @direct_bt_VERSION_SHORT@
Export-Package: org.direct_bt.test
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.9))"
Package-Title: org.direct_bt.test
Package-Vendor: Gothel Software
-Package-Version: @VERSION_SHORT@
+Package-Version: @direct_bt_VERSION_SHORT@
Specification-Title: Direct-BT Unit Tests
Specification-Vendor: Gothel Software
-Specification-Version: @VERSION_API@
+Specification-Version: @direct_bt_VERSION_API@
Implementation-Title: Direct-BT Unit Tests
Implementation-Vendor: Gothel Software
-Implementation-Version: @VERSION@
-Implementation-Commit: @VERSION_SHA1@
+Implementation-Version: @direct_bt_VERSION_LONG@
+Implementation-Commit: @direct_bt_VERSION_SHA1@
Implementation-URL: http://www.jausoft.com/
Extension-Name: org.direct_bt.test
Trusted-Library: true
diff --git a/trial/java/manifest.txt.in b/trial/java/manifest.txt.in
index 1810a199..d6d83955 100644
--- a/trial/java/manifest.txt.in
+++ b/trial/java/manifest.txt.in
@@ -3,19 +3,19 @@ Bundle-Date: @BUILD_TSTAMP@
Bundle-ManifestVersion: 2
Bundle-Name: org.direct_bt.trial
Bundle-SymbolicName: org.direct_bt.trial
-Bundle-Version: @VERSION_SHORT@
+Bundle-Version: @direct_bt_VERSION_SHORT@
Export-Package: org.direct_bt.trial
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.9))"
Package-Title: org.direct_bt.trial
Package-Vendor: Gothel Software
-Package-Version: @VERSION_SHORT@
+Package-Version: @direct_bt_VERSION_SHORT@
Specification-Title: Direct-BT Unit Tests
Specification-Vendor: Gothel Software
-Specification-Version: @VERSION_API@
+Specification-Version: @direct_bt_VERSION_API@
Implementation-Title: Direct-BT Unit Tests
Implementation-Vendor: Gothel Software
-Implementation-Version: @VERSION@
-Implementation-Commit: @VERSION_SHA1@
+Implementation-Version: @direct_bt_VERSION_LONG@
+Implementation-Commit: @direct_bt_VERSION_SHA1@
Implementation-URL: http://www.jausoft.com/
Extension-Name: org.direct_bt.trial
Trusted-Library: true