diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-05-09 17:08:45 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-05-09 17:08:45 +0200 |
commit | 6ee0df629e43dc783f9bc4058f676fa46bbfb5d9 (patch) | |
tree | ea9d4d5af2ac7a55ea137a3364d4243550ad0fb6 /libmpio | |
parent | d741ef40b4e9e374cc3660edc8339bd772d5bfef (diff) | |
download | mpiosh-6ee0df629e43dc783f9bc4058f676fa46bbfb5d9.tar.gz mpiosh-6ee0df629e43dc783f9bc4058f676fa46bbfb5d9.tar.bz2 mpiosh-6ee0df629e43dc783f9bc4058f676fa46bbfb5d9.zip |
Add cmake library checks
Diffstat (limited to 'libmpio')
-rw-r--r-- | libmpio/CMakeLists.txt | 8 | ||||
-rw-r--r-- | libmpio/src/CMakeLists.txt | 2 |
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}) |