Skip to content

Commit 23bc6ea

Browse files
committed
VERSION bump to version 1.0.0
Moving to 1.0 is connected with change of versioning. The version is now split to library version connected strictly with the libyang library and project version providing general version of the project. It is expected that starting with version 2.0 (currently in branch libyang2), the library version will move forward faster than the project version.
1 parent 575b951 commit 23bc6ea

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

CMakeLists.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,23 @@ set(LIBYANG_DESCRIPTION "libyang is YANG data modelling language parser and tool
1515
# Correct RPATH usage on OS X
1616
set(CMAKE_MACOSX_RPATH TRUE)
1717

18-
# set version
19-
set(LIBYANG_MAJOR_VERSION 0)
20-
set(LIBYANG_MINOR_VERSION 16)
21-
set(LIBYANG_MICRO_VERSION 133)
18+
# Version of the project
19+
# Generic version of not only the library. Major version is reserved for really big changes of the project,
20+
# minor version changes with added functionality (new tool, functionality of the tool or library, ...) and
21+
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
22+
set(LIBYANG_MAJOR_VERSION 1)
23+
set(LIBYANG_MINOR_VERSION 0)
24+
set(LIBYANG_MICRO_VERSION 0)
2225
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
23-
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION})
26+
27+
# Version of the library
28+
# Major version is changed with every backward non-compatible API/ABI change in libyang, minor version changes
29+
# with backward compatible change and micro version is connected with any internal change of the library.
30+
set(LIBYANG_MAJOR_SOVERSION 1)
31+
set(LIBYANG_MINOR_SOVERSION 0)
32+
set(LIBYANG_MICRO_SOVERSION 0)
33+
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
34+
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
2435

2536
# set default build type if not specified by user
2637
if(NOT CMAKE_BUILD_TYPE)
@@ -268,7 +279,7 @@ else()
268279
set_target_properties(yangobj PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
269280
endif(ENABLE_STATIC)
270281

271-
set_target_properties(yang PROPERTIES VERSION ${LIBYANG_VERSION} SOVERSION ${LIBYANG_SOVERSION})
282+
set_target_properties(yang PROPERTIES VERSION ${LIBYANG_SOVERSION_FULL} SOVERSION ${LIBYANG_SOVERSION})
272283

273284
# link math
274285
target_link_libraries(yang m)

src/libyang.h.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646
extern "C" {
4747
#endif
4848

49-
#define LY_VERSION_MAJOR @LIBYANG_MAJOR_VERSION@ /**< libyang major version number */
50-
#define LY_VERSION_MINOR @LIBYANG_MINOR_VERSION@ /**< libyang minor version number */
51-
#define LY_VERSION_MICRO @LIBYANG_MICRO_VERSION@ /**< libyang micro version number */
49+
#define LY_VERSION_MAJOR @LIBYANG_MAJOR_SOVERSION@ /**< libyang major version number */
50+
#define LY_VERSION_MINOR @LIBYANG_MINOR_SOVERSION@ /**< libyang minor version number */
51+
#define LY_VERSION_MICRO @LIBYANG_MICRO_SOVERSION@ /**< libyang micro version number */
52+
#define LY_VERSION "@LIBYANG_SOVERSION_FULL@" /**< libyang version string */
5253

5354
/**
5455
* @mainpage About

0 commit comments

Comments
 (0)