[CMAKE] Add some -D__ROS_LONG64__ to please gcc x64
[reactos.git] / dll / win32 / windowscodecs / CMakeLists.txt
1
2 add_definitions(
3 -D__WINESRC__
4 -D__ROS_LONG64__
5 -DENTRY_PREFIX=WIC_
6 -DPROXY_DELEGATION
7 -DWINE_REGISTER_DLL)
8
9 remove_definitions(-D_WIN32_WINNT=0x502)
10 add_definitions(-D_WIN32_WINNT=0x600)
11
12 if(MSVC)
13 # error C4133: 'function': incompatible types - from 'WICPixelFormatNumericRepresentation *' to 'DWORD *'
14 replace_compile_flags("/we4133" " ")
15 endif()
16
17 include_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
24 if(MSVC)
25 add_compile_flags("/FItypeof.h")
26 endif()
27
28 spec2def(windowscodecs.dll windowscodecs.spec ADD_IMPORTLIB)
29 add_rpcproxy_files(windowscodecs_wincodec.idl)
30
31 list(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
61 if(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)
67 else()
68 list(APPEND SOURCE bitmap.c)
69 endif()
70
71 list(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
79 add_library(windowscodecs MODULE
80 ${SOURCE}
81 ${ADDITIONAL_SOURCE})
82
83 set_module_type(windowscodecs win32dll)
84 target_link_libraries(windowscodecs wine uuid ${PSEH_LIB})
85 add_importlibs(windowscodecs ole32 oleaut32 rpcrt4 shlwapi user32 gdi32 advapi32 advapi32_vista propsys msvcrt kernel32 ntdll)
86 add_pch(windowscodecs precomp.h SOURCE)
87 add_cd_file(TARGET windowscodecs DESTINATION reactos/system32 FOR all)