Skip to content

Commit

Permalink
Fixed cmakelists for mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
serge@vak.ru committed Apr 4, 2014
1 parent 5c9d2c1 commit f1489d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
24 changes: 11 additions & 13 deletions CMakeLists.txt
Expand Up @@ -16,16 +16,6 @@ set (CMAKE_C_FLAGS_DEBUG "-Wall")
#set (CMAKE_BUILD_TYPE DEBUG)
set (CMAKE_BUILD_TYPE release)

#
# Linux: need libusb-1.0
#
if (UNIX)
set (HID_SRC hidapi/hid-libusb.c)
find_library (USB_LIB usb-1.0)
find_library (PTHREAD_LIB pthread)
message (STATUS "Found USB library: ${USB_LIB}")
endif()

#
# Mac OS X: need IOKit
#
Expand All @@ -34,11 +24,19 @@ if (APPLE)
find_library (IOKIT_LIB IOKit)
find_library (COREFOUNDATION_LIB CoreFoundation)
message (STATUS "Found IOKit framework: ${IOKIT_LIB}")
#
# Linux: need libusb-1.0
#
elseif (UNIX)
set (HID_SRC hidapi/hid-libusb.c)
find_library (USB_LIB usb-1.0)
find_library (PTHREAD_LIB pthread)
message (STATUS "Found USB library: ${USB_LIB}")
endif()

#
# FT2232-based adapters: Olimex ARM-USB-Tiny and others.
# Need libusb-0.1 library.
# Need legacy libusb-0.1 library.
#
find_path (USBLEGACY_H usb.h
/usr/include
Expand All @@ -47,7 +45,7 @@ find_path (USBLEGACY_H usb.h
find_library (USBLEGACY_LIB
NAMES usb usb-legacy
PATHS /usr/lib
/opt/local/lib
/opt/local/lib/libusb-legacy
)
if (USBLEGACY_LIB AND USBLEGACY_H)
add_definitions (-DUSE_MPSSE)
Expand All @@ -61,7 +59,7 @@ endif()
# Configure the target executable
#
add_definitions (-DSVNVERSION='"${MY_WC_REVISION}"')
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/hidapi)
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/hidapi ${USBLEGACY_H})

add_executable (ejtagproxy
gdbproxy.c
Expand Down
1 change: 0 additions & 1 deletion adapter-pickit2.c
Expand Up @@ -35,7 +35,6 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <usb.h>

#include "adapter.h"
#include "hidapi.h"
Expand Down
1 change: 0 additions & 1 deletion proxy-mips.c
Expand Up @@ -33,7 +33,6 @@
#include <unistd.h>
#include <stdarg.h>
#include <getopt.h>
#include <usb.h>

#include "gdbproxy.h"
#include "target.h"
Expand Down

0 comments on commit f1489d0

Please sign in to comment.