summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-06-28 11:57:21 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-06-28 11:57:21 +0200
commitab0f01c381c16ed61b8258582869912d4c38cbb7 (patch)
treeb8935e0008795fee2a487cf4512a93a1abf8e262 /CMakeLists.txt
parent8f7435e4553916e6cc431e4b5316cc5861fd9063 (diff)
downloadlibnitrokey-ab0f01c381c16ed61b8258582869912d4c38cbb7.tar.gz
libnitrokey-ab0f01c381c16ed61b8258582869912d4c38cbb7.tar.bz2
Adjust code to make compilation under MSVC 2017
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6741b18..11882f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,8 @@
+# https://cmake.org/pipermail/cmake/2011-May/044166.html
+ IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ ENDIF()
+
cmake_minimum_required(VERSION 3.1)
IF (UNIX)
OPTION(USE_CLANG "Use CLang" FALSE)
@@ -111,7 +116,7 @@ install (FILES ${LIB_INCLUDES} DESTINATION "include")
IF (COMPILE_TESTS)
include_directories(unittest/Catch/include)
- add_library(catch SHARED unittest/catch_main.cpp )
+ add_library(catch STATIC unittest/catch_main.cpp )
add_executable (test_C_API unittest/test_C_API.cpp)
target_link_libraries (test_C_API ${EXTRA_LIBS} ${LIBNAME}-log catch)