[GTK][CMake] Translations must be built
[WebKit-https.git] / Source / PlatformGTK.cmake
1 add_subdirectory(${WEBCORE_DIR}/platform/gtk/po)
2
3 if (ENABLE_API_TESTS)
4     if (ENABLE_WEBKIT)
5         add_subdirectory(${WEBKIT_DIR}/gtk/tests)
6     endif ()
7     if (ENABLE_WEBKIT2)
8         add_subdirectory(${WEBKIT2_DIR}/UIProcess/API/gtk/tests)
9     endif ()
10 endif ()
11
12 set(DocumentationDependencies
13     "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml"
14 )
15
16 if (ENABLE_WEBKIT)
17     list(APPEND DocumentationDependencies
18         WebKit
19         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-docs.sgml"
20         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-sections.txt"
21     )
22 endif ()
23
24 if (ENABLE_WEBKIT2)
25     list(APPEND DocumentationDependencies
26         WebKit2
27         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
28         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
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 ()