aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-07 11:50:26 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-07 11:50:40 +0200
commitae7dd58eb381f3e95954705766dc5138e10a03f4 (patch)
tree8185e891cfb9ec26043dbbfcb2c391ddd05dc362
parenta633e72064f48c062c684652cc70b6cb23d708b4 (diff)
downloadlibnitrokey-ae7dd58eb381f3e95954705766dc5138e10a03f4.tar.gz
libnitrokey-ae7dd58eb381f3e95954705766dc5138e10a03f4.tar.bz2
Fix install command
Install binaries Copy all headers to own directory Closes #70 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--CMakeLists.txt9
1 files 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)