diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-10-07 11:48:04 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-10-07 11:48:04 +0200 |
commit | fd52487688c819919eb37d83d90dc96e11ab26ab (patch) | |
tree | 69e8f7c9896b1af0c9ccd3c90103884b0c04ea6b /CMakeLists.txt | |
parent | bb590b172f0d90fddd6187d78b4ffea5601b0561 (diff) | |
download | libnitrokey-fd52487688c819919eb37d83d90dc96e11ab26ab.tar.gz libnitrokey-fd52487688c819919eb37d83d90dc96e11ab26ab.tar.bz2 |
Set SONAME and use semantic versioning
Closes #69
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cd18827..f35ba3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,12 @@ project(libnitrokey) SET(PROJECT_VERSION "3.0-alpha") set(CMAKE_CXX_STANDARD 14) +set(LIBNK_VERSION_MAJOR 3) # reminder: incompatible API changes +set(LIBNK_VERSION_MINOR 0) # add functionality in a backwards-compatible manner +set(LIBNK_VERSION_PATCH 0) # make backwards-compatible bug fixes +set(LIBNK_VERSION ${LIBNK_VERSION_MAJOR}.${LIBNK_VERSION_MINOR}.${LIBNK_VERSION_PATCH} ) + + include(GNUInstallDirs) OPTION(LIBNITROKEY_STATIC "Build libnitrokey statically" TRUE) @@ -98,6 +104,11 @@ ENDIF() target_link_libraries(${LIBNAME} hidapi-libusb) target_link_libraries(${LIBNAME}-log hidapi-libusb) +set_target_properties(${LIBNAME} PROPERTIES VERSION ${LIBNK_VERSION} + SOVERSION ${LIBNK_VERSION_MAJOR} ) +set_target_properties(${LIBNAME}-log PROPERTIES VERSION ${LIBNK_VERSION} + SOVERSION ${LIBNK_VERSION_MAJOR} ) + OPTION(ERROR_ON_WARNING "Stop compilation on warning found (not supported for MSVC)" ON) if (NOT MSVC) set(COMPILE_FLAGS "-Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual") |