[CMAKE]
[reactos.git] / dll / win32 / wdmaud.drv / CMakeLists.txt
1
2 add_definitions(-DUNICODE -D_UNICODE)
3 add_definitions(-DNDEBUG=1)
4
5 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/sound)
6 include_directories(${REACTOS_SOURCE_DIR}/drivers/wdm/audio/legacy/wdmaud)
7 include_directories(${REACTOS_SOURCE_DIR}/lib/drivers/sound/mmixer)
8 include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/libsamplerate)
9
10 add_custom_command(
11 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wdmaud.drv.def
12 COMMAND native-winebuild -o ${CMAKE_CURRENT_BINARY_DIR}/wdmaud.drv.def --def -E ${CMAKE_CURRENT_SOURCE_DIR}/wdmaud.spec --filename wdmaud.drv
13 DEPENDS native-winebuild)
14 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/wdmaud.drv.def PROPERTIES GENERATED TRUE)
15 add_custom_target(wdmaud.drv_def ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/wdmaud.drv.def)
16
17 add_library(wdmaud.drv SHARED
18 wdmaud.c
19 mixer.c
20 mmixer.c
21 legacy.c
22 wdmaud.rc)
23
24 set_module_type(wdmaud.drv win32dll)
25 set_target_properties(wdmaud.drv PROPERTIES SUFFIX "")
26
27 target_link_libraries(wdmaud.drv
28 ${CMAKE_CURRENT_BINARY_DIR}/wdmaud.drv.def
29 mmebuddy
30 libsamplerate
31 mmixer)
32
33 add_importlibs(wdmaud.drv ntdll user32 winmm advapi32 msvcrt setupapi ksuser)
34 add_dependencies(wdmaud.drv wdmaud.drv_def psdk)