summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-03-20 13:43:12 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-20 13:43:12 +0100
commit04dacd90fb06928cad4b29a99239b7b3b664674b (patch)
treedd65fca6fe914ca015399ae1942b774acbfd2d73
parentc6c700c159d731d16ec050d39896e0e8ae41937d (diff)
downloadlibnitrokey-04dacd90fb06928cad4b29a99239b7b3b664674b.tar.gz
libnitrokey-04dacd90fb06928cad4b29a99239b7b3b664674b.tar.bz2
Use proper frameworks with cmake and OSX
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--CMakeLists.txt11
1 files changed, 5 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1dcffb7..09cb023 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,8 +63,9 @@ set(SOURCE_FILES
DeviceCommunicationExceptions.cpp)
IF(APPLE)
- #include_directories(hidapi/hidapi)
- #add_library(hidapi-libusb STATIC hidapi/mac/hid.c )
+ include_directories(hidapi/hidapi)
+ add_library(hidapi-libusb STATIC hidapi/mac/hid.c )
+ target_link_libraries(hidapi-libusb "-framework CoreFoundation" "-framework IOKit")
ELSEIF(UNIX)
# add_library(hidapi-libusb STATIC hidapi/libusb/hid.c )
ELSEIF(WIN32)
@@ -84,10 +85,8 @@ ELSE()
SET(LIBNAME nitrokey-static)
ENDIF()
-IF(NOT APPLE)
- target_link_libraries(${LIBNAME} hidapi-libusb)
- target_link_libraries(${LIBNAME}-log hidapi-libusb)
-ENDIF()
+target_link_libraries(${LIBNAME} hidapi-libusb)
+target_link_libraries(${LIBNAME}-log hidapi-libusb)
SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_DEFINITIONS "NO_LOG")