From fd52487688c819919eb37d83d90dc96e11ab26ab Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 7 Oct 2017 11:48:04 +0200 Subject: Set SONAME and use semantic versioning Closes #69 Signed-off-by: Szczepan Zalega --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CMakeLists.txt') 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") -- cgit v1.2.1