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