[GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
[WebKit-https.git] / Source / PlatformGTK.cmake
1 add_subdirectory(${WEBCORE_DIR}/platform/gtk/po)
2
3 # This allows exposing a 'gir' target which builds all GObject introspection files.
4 add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
5
6 set(DocumentationDependencies
7     "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml"
8 )
9
10 if (ENABLE_WEBKIT)
11     list(APPEND DocumentationDependencies
12         WebKit
13         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-docs.sgml"
14         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-sections.txt"
15     )
16     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitgtk/html/
17             DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkitgtk
18     )
19 endif ()
20
21 if (ENABLE_WEBKIT2)
22     list(APPEND DocumentationDependencies
23         WebKit2
24         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
25         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
26     )
27     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
28             DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk
29     )
30 endif ()
31
32 add_custom_command(
33     OUTPUT docs-build.stamp
34     DEPENDS ${DocumentationDependencies}
35     COMMAND CC="${CMAKE_C_COMPILER}" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc
36     COMMAND touch docs-build.stamp
37     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
38 )
39
40 add_custom_target(fake-docs-target ALL
41     DEPENDS docs-build.stamp
42 )
43
44 if (ENABLE_WEBKIT)
45     add_dependencies(fake-docs-target WebKit)
46 endif ()
47
48 if (ENABLE_WEBKIT2)
49     add_dependencies(fake-docs-target WebKit2)
50 endif ()