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 # error C4312: 'type cast': conversion from 'DWORD' to 'HTASK' of greater size 27 remove_target_compile_option(winmm "/we4312") 28endif() 29 30set_module_type(winmm win32dll) 31target_link_libraries(winmm wine ${PSEH_LIB}) 32add_importlibs(winmm advapi32 user32 msvcrt kernel32 ntdll) 33add_pch(winmm winemm.h SOURCE) 34add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all) 35 36if(NOT MSVC) 37 target_compile_options(winmm PRIVATE "-Wno-unused-but-set-variable") 38endif() 39 40add_subdirectory(midimap) 41