aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-02-14 11:53:25 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:46 +0100
commit6ee68fa294d1d9ab8fa8e61a009845dc31a9b771 (patch)
tree2647e13c34dbffa7827d3c1dfada51a82ba398c9 /CMakeLists.txt
parentadbc664125142c434294bfa795666c90c7608429 (diff)
downloadlibnitrokey-6ee68fa294d1d9ab8fa8e61a009845dc31a9b771.tar.gz
libnitrokey-6ee68fa294d1d9ab8fa8e61a009845dc31a9b771.tar.bz2
Compiles on MXE, but not working on Windows
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e77de6e..89ab66d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,13 +61,13 @@ set(SOURCE_FILES
NK_C_API.cc
)
-#IF(UNIX)
+IF(UNIX)
# add_library(hidapi-libusb STATIC hidapi/libusb/hid.c )
-#ELSE()
+ELSEIF(WIN32)
include_directories(hidapi/hidapi)
- add_library(hidapi-libusb SHARED hidapi/windows/hid.c )
- target_link_libraries(hidapi-libusb setupapi setupapi kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 oleaut32 uuid odbc32 odbccp32)
-#ENDIF()
+ add_library(hidapi-libusb STATIC hidapi/windows/hid.c )
+ target_link_libraries(hidapi-libusb setupapi)
+ENDIF()
IF (NOT LIBNITROKEY_STATIC)
add_library(nitrokey SHARED ${SOURCE_FILES})