[CMake][Win] Conditionally select DLL CRT or static CRT
[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 list(APPEND TestNetscapePlugIn_LIBRARIES
27     WebKitLegacy
28 )
29
30 set(DumpRenderTree_SOURCES
31     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
32 )
33
34 list(APPEND TestNetscapePlugIn_SOURCES
35     win/TestNetscapePlugin.def
36     win/TestNetscapePlugin.rc
37
38     TestNetscapePlugIn/Tests/win/CallJSThatDestroysPlugin.cpp
39     TestNetscapePlugIn/Tests/win/DrawsGradient.cpp
40     TestNetscapePlugIn/Tests/win/DumpWindowRect.cpp
41     TestNetscapePlugIn/Tests/win/GetValueNetscapeWindow.cpp
42     TestNetscapePlugIn/Tests/win/NPNInvalidateRectInvalidatesWindow.cpp
43     TestNetscapePlugIn/Tests/win/WindowGeometryInitializedBeforeSetWindow.cpp
44     TestNetscapePlugIn/Tests/win/WindowRegionIsSetToClipRect.cpp
45     TestNetscapePlugIn/Tests/win/WindowlessPaintRectCoordinates.cpp
46
47     TestNetscapePlugIn/win/WindowGeometryTest.cpp
48     TestNetscapePlugIn/win/WindowedPluginTest.cpp
49 )
50
51 if (${WTF_PLATFORM_WIN_CAIRO})
52     add_definitions(-DWIN_CAIRO)
53 endif ()
54
55 list(APPEND TestNetscapePlugIn_LIBRARIES
56     Msimg32
57     Shlwapi
58     WebKitLegacy
59 )
60
61 list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
62     win
63     TestNetscapePlugIn
64     TestNetscapePlugIn/ForwardingHeaders
65     TestNetscapePlugIn/Tests
66     TestNetscapePlugIn/win
67     TestNetscapePlugIn/Tests/win
68     ${WEBKITLegacy_DIR}/win
69     ${DERIVED_SOURCES_DIR}/WebKitLegacy/Interfaces
70 )
71
72 list(APPEND DumpRenderTree_LIBRARIES
73     WTF
74     WebKitLegacy
75     shlwapi
76 )
77
78 set(DumpRenderTreeLib_LIBRARIES
79     ${DumpRenderTree_LIBRARIES}
80     Comsuppw
81     Oleacc
82     WebKitLegacyGUID
83 )
84
85 if (${WTF_PLATFORM_WIN_CAIRO})
86     list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
87         cairo
88         ${CAIRO_INCLUDE_DIRS}
89     )
90     list(APPEND DumpRenderTreeLib_SOURCES
91         cairo/PixelDumpSupportCairo.cpp
92     )
93 else ()
94     list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
95         cg
96     )
97     list(APPEND DumpRenderTreeLib_SOURCES
98         cg/PixelDumpSupportCG.cpp
99     )
100     list(APPEND DumpRenderTreeLib_LIBRARIES
101         CFNetwork
102         CoreGraphics
103         CoreText
104     )
105 endif ()
106
107 WEBKIT_ADD_PRECOMPILED_HEADER("DumpRenderTreePrefix.h" "win/DumpRenderTreePrefix.cpp" DumpRenderTreeLib_SOURCES)
108 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MSVC_RUNTIME_LINKER_FLAGS}")
109 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
110
111 add_library(DumpRenderTreeLib SHARED ${DumpRenderTreeLib_SOURCES})
112 target_link_libraries(DumpRenderTreeLib ${DumpRenderTreeLib_LIBRARIES})
113
114 add_definitions(-D_UNICODE)