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