[CMAKE] Some options are only supported by GCC, don't use them for clang
[reactos.git] / dll / win32 / winmm / CMakeLists.txt
1
2 add_definitions(-D_WINE)
3 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
4 spec2def(winmm.dll winmm.spec ADD_IMPORTLIB)
5
6 list(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
19 add_library(winmm MODULE
20 ${SOURCE}
21 winmm_res.rc
22 ${CMAKE_CURRENT_BINARY_DIR}/winmm.def)
23
24
25 if(MSVC)
26 # error C4312: 'type cast': conversion from 'DWORD' to 'HTASK' of greater size
27 remove_target_compile_option(winmm "/we4312")
28 endif()
29
30 set_module_type(winmm win32dll)
31 target_link_libraries(winmm wine ${PSEH_LIB})
32 add_importlibs(winmm advapi32 user32 msvcrt kernel32 ntdll)
33 add_pch(winmm winemm.h SOURCE)
34 add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
35
36 if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
37 target_compile_options(winmm PRIVATE -Wno-unused-but-set-variable)
38 endif()
39
40 add_subdirectory(midimap)