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