1 2add_definitions(-D__WINESRC__) 3include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) 4spec2def(riched20.dll riched20.spec ADD_IMPORTLIB) 5 6list(APPEND SOURCE 7 caret.c 8 clipboard.c 9 context.c 10 editor.c 11 list.c 12 paint.c 13 para.c 14 reader.c 15 richole.c 16 row.c 17 run.c 18 string.c 19 style.c 20 table.c 21 undo.c 22 wrap.c 23 writer.c 24 editor.h) 25 26if(MSVC) 27 if(ARCH STREQUAL "i386") 28 list(APPEND SOURCE msvc-thiscall.c) 29 endif() 30 set_source_files_properties(txthost.c txtsrv.c PROPERTIES COMPILE_FLAGS "/FImsvc.h") 31 list(APPEND ADDITIONAL_SOURCE txthost.c txtsrv.c) 32else() 33 list(APPEND SOURCE txthost.c txtsrv.c) 34endif() 35 36if(CMAKE_C_COMPILER_ID STREQUAL "Clang") 37 #FIXME: http://llvm.org/bugs/show_bug.cgi?id=19027 38 set_property(SOURCE txthost.c txtsrv.c APPEND_STRING PROPERTY COMPILE_FLAGS " -no-integrated-as") 39endif() 40 41list(APPEND ADDITIONAL_SOURCE 42 version.rc 43 ${CMAKE_CURRENT_BINARY_DIR}/riched20.def) 44 45list(APPEND riched20_rc_deps 46 ${CMAKE_CURRENT_SOURCE_DIR}/riched_tom.rgs 47 ${CMAKE_CURRENT_BINARY_DIR}/riched_tom.tlb) 48 49set_source_files_properties(version.rc PROPERTIES OBJECT_DEPENDS "${riched20_rc_deps}") 50 51add_library(riched20 SHARED ${SOURCE} ${ADDITIONAL_SOURCE}) 52add_typelib(riched_tom.idl) 53add_dependencies(riched20 stdole2) 54set_module_type(riched20 win32dll) 55target_link_libraries(riched20 wine uuid) 56add_importlibs(riched20 ole32 oleaut32 usp10 imm32 user32 gdi32 msvcrt kernel32 ntdll) 57add_pch(riched20 editor.h SOURCE) 58add_cd_file(TARGET riched20 DESTINATION reactos/system32 FOR all) 59