From ae7dd58eb381f3e95954705766dc5138e10a03f4 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 7 Oct 2017 11:50:26 +0200 Subject: Fix install command Install binaries Copy all headers to own directory Closes #70 Signed-off-by: Szczepan Zalega --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da453cf..d28425a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,8 +92,7 @@ ENDIF() IF (NOT LIBNITROKEY_STATIC) add_library(nitrokey SHARED ${SOURCE_FILES}) add_library(nitrokey-log SHARED ${SOURCE_FILES}) - install (TARGETS nitrokey DESTINATION ${CMAKE_INSTALL_LIBDIR}) - SET(LIBNAME nitrokey) + SET(LIBNAME nitrokey) ELSE() add_library(nitrokey-static STATIC ${SOURCE_FILES}) add_library(nitrokey-static-log STATIC ${SOURCE_FILES}) @@ -123,8 +122,10 @@ endif() SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_DEFINITIONS "NO_LOG") -file(GLOB LIB_INCLUDES "include/libnitrokey/*.h") -install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +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}) IF (COMPILE_TESTS) include_directories(unittest/Catch/include) -- cgit v1.2.3