[GTK] [CMake] Add a production build type
[WebKit-https.git] / Source / PlatformGTK.cmake
1 if (ENABLE_API_TESTS)
2     if (ENABLE_WEBKIT)
3         add_subdirectory(${WEBKIT_DIR}/gtk/tests)
4     endif ()
5     if (ENABLE_WEBKIT2)
6         add_subdirectory(${WEBKIT2_DIR}/UIProcess/API/gtk/tests)
7     endif ()
8 endif ()
9
10 set(DocumentationDependencies
11     "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml"
12 )
13
14 if (ENABLE_WEBKIT)
15     list(APPEND DocumentationDependencies
16         WebKit
17         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-docs.sgml"
18         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-sections.txt"
19     )
20 endif ()
21
22 if (ENABLE_WEBKIT2)
23     list(APPEND DocumentationDependencies
24         WebKit2
25         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
26         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
27     )
28 endif ()
29
30 add_custom_command(
31     OUTPUT docs-build.stamp
32     DEPENDS ${DocumentationDependencies}
33     COMMAND CC="${CMAKE_C_COMPILER}" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc
34     COMMAND touch docs-build.stamp
35     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
36 )
37
38 add_custom_target(fake-docs-target ALL
39     DEPENDS docs-build.stamp
40 )
41
42 if (ENABLE_WEBKIT)
43     add_dependencies(fake-docs-target WebKit)
44 endif ()
45
46 if (ENABLE_WEBKIT2)
47     add_dependencies(fake-docs-target WebKit2)
48 endif ()