xref: /reactos/dll/win32/winmm/CMakeLists.txt (revision 9393fc32)
1
2add_definitions(-D_WINE)
3include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
4spec2def(winmm.dll winmm.spec ADD_IMPORTLIB)
5
6list(APPEND SOURCE
7    driver.c
8    joystick.c
9    lolvldrv.c
10    mci.c
11    mmio.c
12    playsound.c
13    registry.c
14    time.c
15    winmm.c
16    winemm.h
17    ${CMAKE_CURRENT_BINARY_DIR}/winmm_stubs.c)
18
19add_library(winmm MODULE
20    ${SOURCE}
21    winmm_res.rc
22    ${CMAKE_CURRENT_BINARY_DIR}/winmm.def)
23
24
25if(MSVC)
26    # Disable warning C4090: 'function': different 'const' qualifiers
27    # Disable warning C4312: 'type cast': conversion from 'DWORD' to 'HTASK' of greater size
28    target_compile_options(winmm PRIVATE /wd4090 /wd4312)
29endif()
30
31set_module_type(winmm win32dll)
32target_link_libraries(winmm wine ${PSEH_LIB})
33add_importlibs(winmm advapi32 user32 msvcrt kernel32 ntdll)
34add_pch(winmm winemm.h SOURCE)
35add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
36
37if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
38    target_compile_options(winmm PRIVATE -Wno-unused-but-set-variable)
39endif()
40
41add_subdirectory(midimap)
42