[CMAKE]
[reactos.git] / reactos / drivers / usb / usbuhci / CMakeLists.txt
1
2 set_cpp()
3
4 remove_definitions(-D_WIN32_WINNT=0x502)
5 add_definitions(-D_WIN32_WINNT=0x600)
6
7 include_directories(
8 ${REACTOS_SOURCE_DIR}/lib/drivers/libusb)
9
10 list(APPEND SOURCE
11 usbuhci.cpp
12 usb_request.cpp
13 usb_queue.cpp
14 hardware.cpp)
15
16 add_library(usbuhci SHARED
17 ${SOURCE}
18 usbuhci.rc)
19
20 target_link_libraries(usbuhci
21 libusb
22 libcntpr
23 ${PSEH_LIB})
24
25 # FIXME: http://www.cmake.org/Bug/view.php?id=12998
26 if(MSVC)
27 #add_target_compile_flags(usbuhci "/GR-")
28 set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
29 else()
30 target_link_libraries(usbuhci -lgcc)
31 #add_target_compile_flags(usbuhci "-fno-exceptions -fno-rtti")
32 set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
33 endif()
34
35 set_module_type(usbuhci kernelmodedriver)
36 add_importlibs(usbuhci ntoskrnl hal usbd)
37
38 add_cd_file(TARGET usbuhci DESTINATION reactos/system32/drivers NO_CAB FOR all)