# #libusb # if (WIN32) #We patch a CMakeLists.txt into the standard distribution source tree and then build with cmake. ExternalProject_Add ( libusb PREFIX ${CMAKE_INSTALL_PREFIX} URL http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 URL_MD5 7f5a02375ad960d4e33a6dae7d63cfcb PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/patch CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} ) endif (WIN32) if (UNIX) ExternalProject_Add ( libusb PREFIX ${CMAKE_INSTALL_PREFIX} BUILD_IN_SOURCE 1 #When running configure, the current directory must be the source directory URL http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 URL_MD5 7f5a02375ad960d4e33a6dae7d63cfcb PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/patch CONFIGURE_COMMAND ./configure --prefix= BUILD_COMMAND make INSTALL_COMMAND make install ) endif (UNIX)