1 2add_definitions( 3 -D__WINESRC__ 4 -D__ROS_LONG64__ 5 -DENTRY_PREFIX=WIC_ 6 -DPROXY_DELEGATION 7 -DWINE_REGISTER_DLL) 8 9remove_definitions(-D_WIN32_WINNT=0x502) 10add_definitions(-D_WIN32_WINNT=0x600) 11 12include_directories( 13 BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine 14 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libjpeg 15 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib 16 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libpng 17 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libtiff) 18 19if(MSVC) 20 add_compile_flags("/FItypeof.h") 21endif() 22 23spec2def(windowscodecs.dll windowscodecs.spec ADD_IMPORTLIB) 24add_rpcproxy_files(windowscodecs_wincodec.idl) 25 26list(APPEND SOURCE 27 bmpdecode.c 28 bmpencode.c 29 clipper.c 30 clsfactory.c 31 colorcontext.c 32 colortransform.c 33 converter.c 34 fliprotate.c 35 gifformat.c 36 icnsformat.c 37 icoformat.c 38 imgfactory.c 39 info.c 40 jpegformat.c 41 main.c 42 metadatahandler.c 43 metadataquery.c 44 palette.c 45 pngformat.c 46 propertybag.c 47 proxy.c 48 regsvr.c 49 scaler.c 50 stream.c 51 tgaformat.c 52 tiffformat.c 53 ungif.c) 54 55if(MSVC) 56 if(ARCH STREQUAL "i386") 57 list(APPEND SOURCE msvc-thiscall.c) 58 endif() 59 set_source_files_properties(bitmap.c PROPERTIES COMPILE_FLAGS "/FImsvc.h") 60 list(APPEND PCH_SKIP_SOURCE bitmap.c) 61else() 62 list(APPEND SOURCE bitmap.c) 63endif() 64 65list(APPEND PCH_SKIP_SOURCE 66 guid.c 67 ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c 68 ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_stubs.c 69 ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_wincodec_p.c) 70 71add_library(windowscodecs MODULE 72 ${SOURCE} 73 ${PCH_SKIP_SOURCE} 74 version.rc 75 ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def) 76 77if(MSVC) 78 # error C4133: 'function': incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *' 79 remove_target_compile_option(windowscodecs "/we4133") 80endif() 81 82set_module_type(windowscodecs win32dll) 83target_link_libraries(windowscodecs wine uuid ${PSEH_LIB}) 84add_importlibs(windowscodecs ole32 oleaut32 rpcrt4 shlwapi user32 gdi32 advapi32 advapi32_vista propsys msvcrt kernel32 ntdll) 85add_pch(windowscodecs precomp.h "${PCH_SKIP_SOURCE}") 86add_cd_file(TARGET windowscodecs DESTINATION reactos/system32 FOR all) 87