aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-10 18:49:40 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-10 18:49:40 +0200
commitdf6770894262a98a96fa2d153f87ee9499b9f64c (patch)
treeda98c5540320edc9064a8d9e6d9d7722085b8ac7
parent343e4b1e6d53f042df84e951209b5a33b9a617c3 (diff)
parentd7b408f96f196fcd03f90131a3dbcbb1f11a0728 (diff)
downloadlibnitrokey-df6770894262a98a96fa2d153f87ee9499b9f64c.tar.gz
libnitrokey-df6770894262a98a96fa2d153f87ee9499b9f64c.tar.bz2
Merge branch 'cleanup'
-rw-r--r--CMakeLists.txt31
1 files changed, 16 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8cb0fdc..643e630 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,11 +28,11 @@ IF (UNIX)
ENDIF()
project(libnitrokey)
-SET(PROJECT_VERSION "3.0-alpha")
+SET(PROJECT_VERSION "3.1")
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_MINOR 1) # 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} )
@@ -42,7 +42,6 @@ include(GNUInstallDirs)
OPTION(LIBNITROKEY_STATIC "Build libnitrokey statically" FALSE)
-OPTION(COMPILE_TESTS "Compile tests" FALSE)
IF (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
ENDIF()
@@ -91,7 +90,6 @@ ENDIF()
IF (NOT LIBNITROKEY_STATIC)
add_library(nitrokey SHARED ${SOURCE_FILES})
- add_library(nitrokey-log SHARED ${SOURCE_FILES})
SET(LIBNAME nitrokey)
ELSE()
add_library(nitrokey-static STATIC ${SOURCE_FILES})
@@ -103,8 +101,6 @@ target_link_libraries(${LIBNAME} 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)
@@ -126,16 +122,22 @@ ENDIF()
file(GLOB LIB_INCLUDES "include/*.h")
install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libnitrokey)
install (TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
-install (TARGETS ${LIBNAME}-log DESTINATION ${CMAKE_INSTALL_LIBDIR})
+OPTION(COMPILE_TESTS "Compile tests" FALSE)
+OPTION(COMPILE_OFFLINE_TESTS "Compile offline tests" FALSE)
-include_directories(unittest/Catch/include)
-add_library(catch STATIC unittest/catch_main.cpp )
-add_executable (test_offline unittest/test_offline.cc)
-target_link_libraries (test_offline ${EXTRA_LIBS} ${LIBNAME}-log catch)
-#run with 'make test' or 'ctest'
-include (CTest)
-add_test (runs test_offline)
+IF(COMPILE_OFFLINE_TESTS OR COMPILE_TESTS)
+ include_directories(unittest/Catch/include)
+ add_library(catch SHARED unittest/catch_main.cpp )
+ENDIF()
+
+IF(COMPILE_OFFLINE_TESTS)
+ add_executable (test_offline unittest/test_offline.cc)
+ target_link_libraries (test_offline ${EXTRA_LIBS} ${LIBNAME} catch)
+ #run with 'make test' or 'ctest'
+ include (CTest)
+ add_test (runs test_offline)
+ENDIF()
IF (COMPILE_TESTS)
#needs connected PRO device for success
@@ -162,7 +164,6 @@ ENDIF()
-
#SET(CPACK_GENERATOR
# "DEB;RPM")
# build a CPack driven installer package