b9b121af995d136ec271c3de490ebb3d39cbde8a
[WebKit-https.git] / Tools / DumpRenderTree / PlatformWin.cmake
1 set(DumpRenderTreeLib_SOURCES
2     ${DumpRenderTree_SOURCES}
3
4     win/AccessibilityControllerWin.cpp
5     win/AccessibilityUIElementWin.cpp
6     win/DRTDataObject.cpp
7     win/DRTDesktopNotificationPresenter.cpp
8     win/DRTDropSource.cpp
9     win/DumpRenderTree.cpp
10     win/EditingDelegate.cpp
11     win/EventSender.cpp
12     win/FrameLoadDelegate.cpp
13     win/GCControllerWin.cpp
14     win/HistoryDelegate.cpp
15     win/MD5.cpp
16     win/PixelDumpSupportWin.cpp
17     win/PolicyDelegate.cpp
18     win/ResourceLoadDelegate.cpp
19     win/TestRunnerWin.cpp
20     win/TextInputController.cpp
21     win/TextInputControllerWin.cpp
22     win/UIDelegate.cpp
23     win/WorkQueueItemWin.cpp
24 )
25
26 set(DumpRenderTree_SOURCES
27     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
28 )
29
30 list(APPEND TestNetscapePlugin_SOURCES
31     DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def
32     DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc
33
34     TestNetscapePlugin/Tests/win/CallJSThatDestroysPlugin.cpp
35     TestNetscapePlugin/Tests/win/DrawsGradient.cpp
36     TestNetscapePlugin/Tests/win/DumpWindowRect.cpp
37     TestNetscapePlugin/Tests/win/GetValueNetscapeWindow.cpp
38     TestNetscapePlugin/Tests/win/NPNInvalidateRectInvalidatesWindow.cpp
39     TestNetscapePlugin/Tests/win/WindowGeometryInitializedBeforeSetWindow.cpp
40     TestNetscapePlugin/Tests/win/WindowRegionIsSetToClipRect.cpp
41     TestNetscapePlugin/Tests/win/WindowlessPaintRectCoordinates.cpp
42
43     TestNetscapePlugin/win/WindowGeometryTest.cpp
44     TestNetscapePlugin/win/WindowedPluginTest.cpp
45 )
46
47 if (${WTF_PLATFORM_WIN_CAIRO})
48     add_definitions(-DWIN_CAIRO)
49 endif ()
50
51 list(APPEND TestNetscapePlugin_LIBRARIES
52     Msimg32
53     Shlwapi
54 )
55
56 set(ImageDiff_SOURCES
57     win/ImageDiffWin.cpp
58 )
59
60 set(ImageDiff_LIBRARIES
61    JavaScriptCore
62    WTF
63    WebKit
64 )
65
66 list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
67     win
68     DumpRenderTree.vcxproj/TestNetscapePlugin
69     TestNetscapePlugin
70     TestNetscapePlugin/ForwardingHeaders
71     TestNetscapePlugin/Tests
72     TestNetscapePlugin/win
73     TestNetscapePlugin/Tests/win
74     ${DERIVED_SOURCES_DIR}/WebKit/Interfaces
75 )
76
77 list(APPEND DumpRenderTree_LIBRARIES
78     shlwapi
79 )
80
81 set(DumpRenderTreeLib_LIBRARIES
82     ${DumpRenderTree_LIBRARIES}
83     Comsuppw
84     Oleacc
85     WebKitGUID
86 )
87
88 if (${WTF_PLATFORM_WIN_CAIRO})
89     list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
90         cairo
91         "${WEBKIT_LIBRARIES_DIR}/include/cairo"
92     )
93     list(APPEND DumpRenderTreeLib_SOURCES
94         cairo/PixelDumpSupportCairo.cpp
95     )
96     list(APPEND ImageDiff_SOURCES
97         win/ImageDiffCairo.cpp
98     )
99     list(APPEND ImageDiff_LIBRARIES
100         cairo
101     )
102 else ()
103     list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
104         cg
105     )
106     list(APPEND DumpRenderTreeLib_SOURCES
107         cg/PixelDumpSupportCG.cpp
108     )
109     list(APPEND DumpRenderTreeLib_LIBRARIES
110         CFNetwork
111         CoreGraphics
112     )
113     list(APPEND ImageDiff_SOURCES
114         cg/ImageDiffCG.cpp
115     )
116     list(APPEND ImageDiff_LIBRARIES
117        CoreFoundation
118        CoreGraphics
119     )
120 endif ()
121
122 ADD_PRECOMPILED_HEADER("DumpRenderTreePrefix.h" "win/DumpRenderTreePrefix.cpp" DumpRenderTreeLib_SOURCES)
123 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
124 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
125
126 add_library(DumpRenderTreeLib SHARED ${DumpRenderTreeLib_SOURCES})
127 set_target_properties(DumpRenderTreeLib PROPERTIES FOLDER "Tools")
128 target_link_libraries(DumpRenderTreeLib ${DumpRenderTreeLib_LIBRARIES})
129
130 add_executable(ImageDiff ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp)
131 target_link_libraries(ImageDiff shlwapi)
132 set_target_properties(ImageDiff PROPERTIES FOLDER "Tools")
133 set_target_properties(ImageDiff PROPERTIES OUTPUT_NAME "ImageDiff")
134
135 add_library(ImageDiffLib SHARED ${ImageDiff_SOURCES})
136 set_target_properties(ImageDiffLib PROPERTIES FOLDER "Tools")
137 target_link_libraries(ImageDiffLib ${ImageDiff_LIBRARIES})
138
139 add_dependencies(ImageDiff ImageDiffLib)
140
141 add_definitions(-D_UNICODE)