aboutsummaryrefslogtreecommitdiff
path: root/libmpio
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-05-09 17:08:45 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-05-09 17:08:45 +0200
commit6ee0df629e43dc783f9bc4058f676fa46bbfb5d9 (patch)
treeea9d4d5af2ac7a55ea137a3364d4243550ad0fb6 /libmpio
parentd741ef40b4e9e374cc3660edc8339bd772d5bfef (diff)
downloadmpiosh-6ee0df629e43dc783f9bc4058f676fa46bbfb5d9.tar.gz
mpiosh-6ee0df629e43dc783f9bc4058f676fa46bbfb5d9.tar.bz2
mpiosh-6ee0df629e43dc783f9bc4058f676fa46bbfb5d9.zip
Add cmake library checks
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})