aboutsummaryrefslogtreecommitdiff
path: root/libmpio
diff options
context:
space:
mode:
Diffstat (limited to 'libmpio')
-rw-r--r--libmpio/CMakeLists.txt8
-rw-r--r--libmpio/src/CMakeLists.txt2
2 files changed, 9 insertions, 1 deletions
diff --git a/libmpio/CMakeLists.txt b/libmpio/CMakeLists.txt
index fb590ef..4ceb7fd 100644
--- a/libmpio/CMakeLists.txt
+++ b/libmpio/CMakeLists.txt
@@ -3,4 +3,12 @@ cmake_minimum_required (VERSION 2.4)
set (PACKAGE libmpio)
project (${PACKAGE} C)
+find_library (LIBUSB NAMES usb)
+
+if (LIBUSB)
+ message (STATUS "found libusb at ${LIBUSB}")
+else (LIBUSB)
+ message (FATAL_ERROR "libusb is required")
+endif (LIBUSB)
+
add_subdirectory (src)
diff --git a/libmpio/src/CMakeLists.txt b/libmpio/src/CMakeLists.txt
index 0422cb7..e16f34e 100644
--- a/libmpio/src/CMakeLists.txt
+++ b/libmpio/src/CMakeLists.txt
@@ -5,5 +5,5 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../)
add_library (mpio STATIC mpio.c io.c debug.c smartmedia.c mmc.c directory.c
fat.c ecc.c cis.c)
-target_link_libraries (mpio -lusb)
+target_link_libraries (mpio ${LIBUSB})