-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
35 lines (30 loc) · 1.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.2)
project(usbip_libusb C)
set(CMAKE_C_STANDARD 11)
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "include" "libusb" "libusb-1.0")
find_library(LIBUSB_LIBRARY NAMES usb-1.0 PATH_SUFFIXES "lib" "lib32" "lib64")
if(NOT LIBUSB_INCLUDE_DIR OR NOT LIBUSB_LIBRARY)
error("libusb not found")
endif()
include_directories(include libsrc)
add_definitions(-DDEBUG)
add_executable(${PROJECT_NAME}
include/usbip.h
include/list.h
src/names.c
src/names.h
src/usbip_network.c
include/usbip_network.h
src/usbipd_requests.c
src/usbipd.c
src/usbipd_requests.h
driver-libusb/stub.h
driver-libusb/stub_common.c
driver-libusb/stub_common.h
driver-libusb/usbip_host_driver.c
driver-libusb/stub_event.c
driver-libusb/stub_main.c
driver-libusb/stub_rx.c
driver-libusb/stub_tx.c include/usbip_host_driver.h include/usbip_debug.h src/usbip_debug.c)
target_include_directories(${PROJECT_NAME} PRIVATE ${LIBUSB_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBUSB_LIBRARY} pthread)