diff options
| author | 2009-08-24 17:59:35 +0200 | |
|---|---|---|
| committer | 2009-08-24 17:59:35 +0200 | |
| commit | ec63619f611c7246247485ae3d27818aa2aa1dbd (patch) | |
| tree | 2e9f404deb24c15dbe44bc87f28065b6008ee099 /usbmuxd/CMakeLists.txt | |
| parent | 0a1fe2abddbd73ed00a93afd8dcaf38f5210c0fc (diff) | |
| download | usbmuxd-ec63619f611c7246247485ae3d27818aa2aa1dbd.tar.gz usbmuxd-ec63619f611c7246247485ae3d27818aa2aa1dbd.tar.bz2 | |
ZLP flag is an enum, move check into CMake.
Now prints the big fat warning at configure time
Diffstat (limited to 'usbmuxd/CMakeLists.txt')
| -rw-r--r-- | usbmuxd/CMakeLists.txt | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/usbmuxd/CMakeLists.txt b/usbmuxd/CMakeLists.txt index 7d0d3d8..f95727c 100644 --- a/usbmuxd/CMakeLists.txt +++ b/usbmuxd/CMakeLists.txt | |||
| @@ -6,8 +6,27 @@ include_directories (${CMAKE_SOURCE_DIR}/common) | |||
| 6 | include_directories (${CMAKE_SOURCE_DIR}/usbmuxd) | 6 | include_directories (${CMAKE_SOURCE_DIR}/usbmuxd) |
| 7 | include_directories (${CMAKE_SOURCE_DIR}/libusbmuxd) | 7 | include_directories (${CMAKE_SOURCE_DIR}/libusbmuxd) |
| 8 | 8 | ||
| 9 | include(CheckConstantExists) | ||
| 10 | set(CMAKE_REQUIRED_INCLUDES ${USB_INCLUDE_DIRS}) | ||
| 11 | check_constant_exists(LIBUSB_TRANSFER_ZERO_PACKET libusb.h HAVE_LIBUSB_ZLP) | ||
| 12 | |||
| 13 | if(NOT HAVE_LIBUSB_ZLP) | ||
| 14 | message(" | ||
| 15 | ================================================================================ | ||
| 16 | ==================================== WARNING =================================== | ||
| 17 | ================================================================================ | ||
| 18 | Your libusb is missing proper Zero Length Packet support! If you are using a | ||
| 19 | recent libusb Git, things may or may not work. If you are using libusb 1.0.2 or | ||
| 20 | earlier, things will definitely not work properly. | ||
| 21 | |||
| 22 | Please apply the patch in the contrib/ directory to your libusb 1.0 tree. | ||
| 23 | ================================================================================ | ||
| 24 | ") | ||
| 25 | add_definitions(-DEXPLICIT_ZLP_TRANSACTION) | ||
| 26 | endif(NOT HAVE_LIBUSB_ZLP) | ||
| 27 | |||
| 9 | add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON) | 28 | add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON) |
| 10 | add_executable(usbmuxd main.c usb-linux.c log.c ../common/utils.c device.c client.c) | 29 | add_executable(usbmuxd main.c usb-linux.c log.c ../common/utils.c device.c client.c) |
| 11 | target_link_libraries(usbmuxd ${LIBS}) | 30 | target_link_libraries(usbmuxd ${LIBS}) |
| 12 | 31 | ||
| 13 | install(TARGETS usbmuxd RUNTIME DESTINATION sbin) \ No newline at end of file | 32 | install(TARGETS usbmuxd RUNTIME DESTINATION sbin) |
