summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-06-19 14:56:33 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2018-06-19 14:56:33 +0200
commit35ba2261ddeac3881dc7d4f14b737947a19a4b9b (patch)
tree0547232f9f4ad035c1be574c772163e148ad4e07 /CMakeLists.txt
parent6e3ae3175b34679cf1e84fc6dc5b9ebe6a9c0478 (diff)
downloadlibnitrokey-35ba2261ddeac3881dc7d4f14b737947a19a4b9b.tar.gz
libnitrokey-35ba2261ddeac3881dc7d4f14b737947a19a4b9b.tar.bz2
Move implementation from header back to compilation unit
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11e3f3c..06ab448 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,7 +41,6 @@ IF (NOT CMAKE_BUILD_TYPE)
ENDIF()
MESSAGE("${PROJECT_NAME}: Build type: ${CMAKE_BUILD_TYPE}")
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/libnitrokey)
include_directories(hidapi)
include_directories(libnitrokey)
set(SOURCE_FILES
@@ -67,7 +66,9 @@ set(SOURCE_FILES
NitrokeyManager.cc
NK_C_API.h
NK_C_API.cc
- DeviceCommunicationExceptions.cpp)
+ DeviceCommunicationExceptions.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/version.cc
+ )
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build all libraries as shared")
add_library(nitrokey ${SOURCE_FILES})
@@ -118,10 +119,10 @@ ENDIF()
# generate version.h
exec_program("git" ${CMAKE_CURRENT_SOURCE_DIR} ARGS "describe --always" OUTPUT_VARIABLE PROJECT_VERSION_GIT)
-configure_file("libnitrokey/version.h.in" "libnitrokey/version.h" @ONLY)
+configure_file("version.cc.in" "version.cc" @ONLY)
-file(GLOB LIB_INCLUDES "libnitrokey/*.h" "NK_C_API.h" "${CMAKE_CURRENT_BINARY_DIR}/libnitrokey/version.h")
+file(GLOB LIB_INCLUDES "libnitrokey/*.h" "NK_C_API.h")
install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
install (TARGETS nitrokey DESTINATION ${CMAKE_INSTALL_LIBDIR})