From 2da9ee14459d169fd033e36efe8780250b4283b1 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 28 Jun 2017 11:57:21 +0200 Subject: Run compilation using Qt Creator --- libnitrokey.pro | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 libnitrokey.pro (limited to 'libnitrokey.pro') diff --git a/libnitrokey.pro b/libnitrokey.pro new file mode 100644 index 0000000..621a137 --- /dev/null +++ b/libnitrokey.pro @@ -0,0 +1,76 @@ +# Created by and for Qt Creator. This file was created for editing the project sources only. +# You may attempt to use it for building too, by modifying this file here. + +#TARGET = libnitrokey + +CONFIG += c++14 staticlib +#QT = + +TEMPLATE = lib +TARGET = nitrokey + +HEADERS = \ + $$PWD/hidapi/hidapi/hidapi.h \ +# $$PWD/include/hidapi/hidapi.h \ + $$PWD/include/command.h \ + $$PWD/include/command_id.h \ + $$PWD/include/CommandFailedException.h \ + $$PWD/include/cxx_semantics.h \ + $$PWD/include/device.h \ + $$PWD/include/device_proto.h \ + $$PWD/include/DeviceCommunicationExceptions.h \ + $$PWD/include/dissect.h \ + $$PWD/include/inttypes.h \ + $$PWD/include/LibraryException.h \ + $$PWD/include/log.h \ + $$PWD/include/LongOperationInProgressException.h \ + $$PWD/include/misc.h \ + $$PWD/include/NitrokeyManager.h \ + $$PWD/include/stick10_commands.h \ + $$PWD/include/stick10_commands_0.8.h \ + $$PWD/include/stick20_commands.h \ + $$PWD/NK_C_API.h + +SOURCES = \ + $$PWD/command_id.cc \ + $$PWD/device.cc \ + $$PWD/DeviceCommunicationExceptions.cpp \ + $$PWD/log.cc \ + $$PWD/misc.cc \ + $$PWD/NitrokeyManager.cc \ + $$PWD/NK_C_API.cc + + +tests { + SOURCES += \ + $$PWD/unittest/catch_main.cpp \ + $$PWD/unittest/test.cc \ + $$PWD/unittest/test2.cc \ + $$PWD/unittest/test3.cc \ + $$PWD/unittest/test_C_API.cpp \ + $$PWD/unittest/test_HOTP.cc +} + +unix:!macx{ + SOURCES += $$PWD/hidapi/linux/hid.c +} + +unix{ + SOURCES += $$PWD/hidapi/mac/hid.c +} + +#win32 { + SOURCES += $$PWD/hidapi/windows/hid.c + LIBS += -lsetupapi +#} + +INCLUDEPATH = \ + $$PWD/. \ + $$PWD/hidapi/hidapi \ + $$PWD/include \ + $$PWD/include/hidapi \ + $$PWD/unittest \ + $$PWD/unittest/Catch/single_include + +#DEFINES = + -- cgit v1.2.1 From 3cc0028870701cc862f3feeda781ea9e35281d87 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 20 Sep 2017 08:48:34 +0200 Subject: Guard Windows instructions Signed-off-by: Szczepan Zalega --- libnitrokey.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libnitrokey.pro') diff --git a/libnitrokey.pro b/libnitrokey.pro index 621a137..5af0526 100644 --- a/libnitrokey.pro +++ b/libnitrokey.pro @@ -59,10 +59,10 @@ unix{ SOURCES += $$PWD/hidapi/mac/hid.c } -#win32 { +win32 { SOURCES += $$PWD/hidapi/windows/hid.c LIBS += -lsetupapi -#} +} INCLUDEPATH = \ $$PWD/. \ -- cgit v1.2.1 From a57ed65f90c2ffda245c93aaa4aa710b605550d7 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 20 Sep 2017 11:19:30 +0200 Subject: Qt project update Build shared library with debug symbols Fix build for Linux Remove commented lines Signed-off-by: Szczepan Zalega --- libnitrokey.pro | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libnitrokey.pro') diff --git a/libnitrokey.pro b/libnitrokey.pro index 5af0526..f7711bf 100644 --- a/libnitrokey.pro +++ b/libnitrokey.pro @@ -1,17 +1,13 @@ # Created by and for Qt Creator. This file was created for editing the project sources only. # You may attempt to use it for building too, by modifying this file here. -#TARGET = libnitrokey - -CONFIG += c++14 staticlib -#QT = +CONFIG += c++14 shared debug TEMPLATE = lib TARGET = nitrokey HEADERS = \ $$PWD/hidapi/hidapi/hidapi.h \ -# $$PWD/include/hidapi/hidapi.h \ $$PWD/include/command.h \ $$PWD/include/command_id.h \ $$PWD/include/CommandFailedException.h \ @@ -52,11 +48,13 @@ tests { } unix:!macx{ - SOURCES += $$PWD/hidapi/linux/hid.c +# SOURCES += $$PWD/hidapi/linux/hid.c + LIBS += -lhidapi-libusb } -unix{ +macx{ SOURCES += $$PWD/hidapi/mac/hid.c + LIBS+= -framework IOKit -framework CoreFoundation } win32 { -- cgit v1.2.1