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