[Mac] WebInspectorUI.framework does not need to be soft-linked anymore
[WebKit-https.git] / Tools / DumpRenderTree / PlatformMac.cmake
1 find_library(QUARTZ_LIBRARY Quartz)
2 find_library(CARBON_LIBRARY Carbon)
3 find_library(CORESERVICES_LIBRARY CoreServices)
4
5 # FIXME: We shouldn't need to define NS_RETURNS_RETAINED.
6 add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks -iframework ${CORESERVICES_LIBRARY}/Frameworks -DNS_RETURNS_RETAINED=)
7
8 link_directories(../../WebKitLibraries)
9 include_directories(../../WebKitLibraries)
10
11 list(APPEND TestNetscapePlugIn_LIBRARIES
12     ${QUARTZ_LIBRARY}
13     WebKit
14 )
15
16 list(APPEND DumpRenderTree_LIBRARIES
17     ${CARBON_LIBRARY}
18     ${QUARTZ_LIBRARY}
19     WebKit
20 )
21
22 list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
23     cg
24     cf
25     mac
26     mac/InternalHeaders/WebKit
27     TestNetscapePlugIn
28     ${FORWARDING_HEADERS_DIR}
29     ${FORWARDING_HEADERS_DIR}/WebCore
30     ${FORWARDING_HEADERS_DIR}/WebKit
31     ${FORWARDING_HEADERS_DIR}/WebKitLegacy
32     ${WEBCORE_DIR}/testing/cocoa
33 )
34
35 # Common ${TestNetscapePlugIn_SOURCES} from CMakeLists.txt are C++ source files.
36 list(APPEND TestNetscapePlugIn_Cpp_SOURCES
37     ${TestNetscapePlugIn_SOURCES}
38 )
39
40 list(APPEND TestNetscapePlugIn_ObjCpp_SOURCES
41     TestNetscapePlugIn/PluginObjectMac.mm
42 )
43
44 set(TestNetscapePlugIn_SOURCES
45     ${TestNetscapePlugIn_Cpp_SOURCES}
46     ${TestNetscapePlugIn_ObjCpp_SOURCES}
47 )
48
49 # Common ${DumpRenderTree_SOURCES} from CMakeLists.txt are C++ source files.
50 list(APPEND DumpRenderTree_Cpp_SOURCES
51     ${DumpRenderTree_SOURCES}
52 )
53
54 list(APPEND DumpRenderTree_ObjC_SOURCES
55     DefaultPolicyDelegate.m
56     DumpRenderTreeFileDraggingSource.m
57
58     mac/AppleScriptController.m
59     mac/NavigationController.m
60     mac/ObjCController.m
61     mac/ObjCPlugin.m
62     mac/ObjCPluginFunction.m
63     mac/TextInputControllerMac.m
64 )
65
66 list(APPEND DumpRenderTree_Cpp_SOURCES
67     cg/PixelDumpSupportCG.cpp
68 )
69
70 list(APPEND DumpRenderTree_ObjCpp_SOURCES
71     mac/AccessibilityCommonMac.mm
72     mac/AccessibilityControllerMac.mm
73     mac/AccessibilityNotificationHandler.mm
74     mac/AccessibilityTextMarkerMac.mm
75     mac/AccessibilityUIElementMac.mm
76     mac/DumpRenderTree.mm
77     mac/DumpRenderTreeDraggingInfo.mm
78     mac/DumpRenderTreeMain.mm
79     mac/DumpRenderTreePasteboard.mm
80     mac/DumpRenderTreeWindow.mm
81     mac/EditingDelegate.mm
82     mac/EventSendingController.mm
83     mac/FrameLoadDelegate.mm
84     mac/GCControllerMac.mm
85     mac/HistoryDelegate.mm
86     mac/MockGeolocationProvider.mm
87     mac/MockWebNotificationProvider.mm
88     mac/PixelDumpSupportMac.mm
89     mac/PolicyDelegate.mm
90     mac/ResourceLoadDelegate.mm
91     mac/TestRunnerMac.mm
92     mac/UIDelegate.mm
93     mac/UIScriptControllerMac.mm
94     mac/WorkQueueItemMac.mm
95 )
96
97 set(DumpRenderTree_SOURCES
98     ${DumpRenderTree_Cpp_SOURCES}
99     ${DumpRenderTree_ObjC_SOURCES}
100     ${DumpRenderTree_ObjCpp_SOURCES}
101 )
102
103 foreach (_file ${DumpRenderTree_ObjC_SOURCES})
104     set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c99")
105 endforeach ()
106
107 foreach (_file ${DumpRenderTree_Cpp_SOURCES} ${TestNetscapePlugIn_Cpp_SOURCES})
108     set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c++17")
109 endforeach ()
110
111 foreach (_file ${DumpRenderTree_ObjCpp_SOURCES} ${TestNetscapePlugIn_ObjCpp_SOURCES})
112     set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++17")
113 endforeach ()
114
115 set(DumpRenderTree_RESOURCES
116     AHEM____.TTF
117     FontWithFeatures.otf
118     FontWithFeatures.ttf
119     WebKitWeightWatcher100.ttf
120     WebKitWeightWatcher200.ttf
121     WebKitWeightWatcher300.ttf
122     WebKitWeightWatcher400.ttf
123     WebKitWeightWatcher500.ttf
124     WebKitWeightWatcher600.ttf
125     WebKitWeightWatcher700.ttf
126     WebKitWeightWatcher800.ttf
127     WebKitWeightWatcher900.ttf
128 )
129
130 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DumpRenderTree.resources)
131 foreach (_file ${DumpRenderTree_RESOURCES})
132     file(COPY ${TOOLS_DIR}/DumpRenderTree/fonts/${_file} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DumpRenderTree.resources)
133 endforeach ()