From 04dacd90fb06928cad4b29a99239b7b3b664674b Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 20 Mar 2017 13:43:12 +0100 Subject: Use proper frameworks with cmake and OSX Signed-off-by: Szczepan Zalega --- CMakeLists.txt | 11 +++++------ 1 file 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") -- cgit v1.2.3