diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-16 16:51:28 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-16 16:51:28 +0100 |
commit | c6c700c159d731d16ec050d39896e0e8ae41937d (patch) | |
tree | a628314519c7f9dce92479d69fd4552d41629d08 /CMakeLists.txt | |
parent | ea3032027552d9f00a87e65b6a6399a07f1c5738 (diff) | |
parent | dc63e51bd6bf71559829f61030b94c1bfdbf4401 (diff) | |
download | libnitrokey-c6c700c159d731d16ec050d39896e0e8ae41937d.tar.gz libnitrokey-c6c700c159d731d16ec050d39896e0e8ae41937d.tar.bz2 |
Merge branch 'osx_build'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46405a9..1dcffb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,10 @@ set(SOURCE_FILES NK_C_API.cc DeviceCommunicationExceptions.cpp) -IF(UNIX) +IF(APPLE) + #include_directories(hidapi/hidapi) + #add_library(hidapi-libusb STATIC hidapi/mac/hid.c ) +ELSEIF(UNIX) # add_library(hidapi-libusb STATIC hidapi/libusb/hid.c ) ELSEIF(WIN32) include_directories(hidapi/hidapi) @@ -80,8 +83,11 @@ ELSE() add_library(nitrokey-static-log STATIC ${SOURCE_FILES}) SET(LIBNAME nitrokey-static) ENDIF() -target_link_libraries(${LIBNAME} hidapi-libusb) -target_link_libraries(${LIBNAME}-log hidapi-libusb) + +IF(NOT APPLE) + target_link_libraries(${LIBNAME} hidapi-libusb) + target_link_libraries(${LIBNAME}-log hidapi-libusb) +ENDIF() SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_DEFINITIONS "NO_LOG") @@ -124,4 +130,4 @@ include (InstallRequiredSystemLibraries) set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set (CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") -include (CPack)
\ No newline at end of file +include (CPack) |