diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-08-23 18:05:11 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-08-23 18:05:11 +0200 |
commit | dee6ebe5d0a9ea5d555852011d219a66d8746b0e (patch) | |
tree | 28fbfde73768edbf3bcd43b843e61360fd36df63 | |
parent | ef171dfd5bf23da606597a251c327ad2c52ec7b8 (diff) | |
download | libnitrokey-dee6ebe5d0a9ea5d555852011d219a66d8746b0e.tar.gz libnitrokey-dee6ebe5d0a9ea5d555852011d219a66d8746b0e.tar.bz2 |
Fix potential names clash with client projectsnames_clash
Nitrokey App was failing to build due to name clash with version.h file. Renamed.
Tested CMake, QMake and Meson build.
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | NK_C_API.cc | 2 | ||||
-rw-r--r-- | libnitrokey.pro | 8 | ||||
-rw-r--r-- | libnitrokey/version-libnk.h (renamed from libnitrokey/version.h) | 0 | ||||
-rw-r--r-- | meson.build | 8 | ||||
m--------- | unittest/Catch | 0 | ||||
-rw-r--r-- | version-libnk.cc (renamed from version.cc) | 2 | ||||
-rw-r--r-- | version-libnk.cc.in (renamed from version.cc.in) | 2 |
8 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 32f75a3..32eb62a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ set(SOURCE_FILES NK_C_API.h NK_C_API.cc DeviceCommunicationExceptions.cpp - ${CMAKE_CURRENT_BINARY_DIR}/version.cc + ${CMAKE_CURRENT_BINARY_DIR}/version-libnk.cc ) set(BUILD_SHARED_LIBS ON CACHE BOOL "Build all libraries as shared") @@ -133,7 +133,7 @@ IF((NOT ${ADD_GIT_INFO}) OR (${PROJECT_VERSION_GIT_RETURN_CODE})) SET(PROJECT_VERSION_GIT "unknown") MESSAGE(STATUS "Setting Git library version to: " ${PROJECT_VERSION_GIT} ) ENDIF() -configure_file("version.cc.in" "version.cc" @ONLY) +configure_file("version-libnk.cc.in" "version-libnk.cc" @ONLY) file(GLOB LIB_INCLUDES "libnitrokey/*.h" "NK_C_API.h") diff --git a/NK_C_API.cc b/NK_C_API.cc index 7d0a10e..d529f42 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -27,7 +27,7 @@ #include "libnitrokey/LibraryException.h" #include "libnitrokey/cxx_semantics.h" #include "libnitrokey/stick20_commands.h" -#include "version.h" +#include "libnitrokey/version-libnk.h" #ifdef _MSC_VER #ifdef _WIN32 diff --git a/libnitrokey.pro b/libnitrokey.pro index 75ce4a2..b8accba 100644 --- a/libnitrokey.pro +++ b/libnitrokey.pro @@ -13,6 +13,8 @@ QMAKE_TARGET_PRODUCT = libnitrokey QMAKE_TARGET_DESCRIPTION = Communicate with Nitrokey stick devices in a clean and easy manner QMAKE_TARGET_COPYRIGHT = Copyright (c) 2015-2018 Nitrokey UG +message($$PWD) + HEADERS = \ $$PWD/hidapi/hidapi/hidapi.h \ $$PWD/libnitrokey/command.h \ @@ -25,7 +27,7 @@ HEADERS = \ $$PWD/libnitrokey/dissect.h \ $$PWD/libnitrokey/LibraryException.h \ $$PWD/libnitrokey/log.h \ - $$PWD/libnitrokey/version.h \ + $$PWD/libnitrokey/version-libnk.h \ $$PWD/libnitrokey/LongOperationInProgressException.h \ $$PWD/libnitrokey/misc.h \ $$PWD/libnitrokey/NitrokeyManager.h \ @@ -40,7 +42,7 @@ SOURCES = \ $$PWD/device.cc \ $$PWD/DeviceCommunicationExceptions.cpp \ $$PWD/log.cc \ - $$PWD/version.cc \ + $$PWD/version-libnk.cc \ $$PWD/misc.cc \ $$PWD/NitrokeyManager.cc \ $$PWD/NK_C_API.cc @@ -49,7 +51,7 @@ SOURCES = \ tests { SOURCES += \ $$PWD/unittest/catch_main.cpp \ - $$PWD/unittest/test.cc \ + $$PWD/unittest/test1.cc \ $$PWD/unittest/test2.cc \ $$PWD/unittest/test3.cc \ $$PWD/unittest/test_C_API.cpp \ diff --git a/libnitrokey/version.h b/libnitrokey/version-libnk.h index 6547af0..6547af0 100644 --- a/libnitrokey/version.h +++ b/libnitrokey/version-libnk.h diff --git a/meson.build b/meson.build index 600be6d..bbe6830 100644 --- a/meson.build +++ b/meson.build @@ -46,13 +46,13 @@ version_data.set('PROJECT_VERSION_MINOR', version_minor) # We don't want to substitute it by noop version_data.set('PROJECT_VERSION_GIT', '@VCS_TAG@') version_cc_in = configure_file( - input : 'version.cc.in', - output : 'version.cc.in', + input : 'version-libnk.cc.in', + output : 'version-libnk.cc.in', configuration : version_data, ) version_cc = vcs_tag( input : version_cc_in, - output : 'version.cc', + output : 'version-libnk.cc', fallback : 'v@0@'.format(meson.project_version()), ) libnitrokey = library( @@ -90,7 +90,7 @@ install_headers( 'libnitrokey/log.h', 'libnitrokey/LongOperationInProgressException.h', 'libnitrokey/misc.h', - 'libnitrokey/version.h', + 'libnitrokey/version-libnk.h', 'libnitrokey/NitrokeyManager.h', 'libnitrokey/stick10_commands_0.8.h', 'libnitrokey/stick10_commands.h', diff --git a/unittest/Catch b/unittest/Catch -Subproject 15cf3caaceb21172ea42a24e595a2eb58c3ec96 +Subproject 62dae592c330ab74cea30c897255ee9518639c3 diff --git a/version.cc b/version-libnk.cc index dfdc802..e0de341 100644 --- a/version.cc +++ b/version-libnk.cc @@ -19,7 +19,7 @@ * SPDX-License-Identifier: LGPL-3.0 */ -#include "version.h" +#include "version-libnk.h" namespace nitrokey { unsigned int get_major_library_version() { diff --git a/version.cc.in b/version-libnk.cc.in index 0eae647..a2499ca 100644 --- a/version.cc.in +++ b/version-libnk.cc.in @@ -19,7 +19,7 @@ * SPDX-License-Identifier: LGPL-3.0 */ -#include "version.h" +#include "version-libnk.h" namespace nitrokey { unsigned int get_major_library_version() { |