PlatformGTK.cmake 1.68 KB
Newer Older
1 2
add_subdirectory(${WEBCORE_DIR}/platform/gtk/po)

3 4 5
# This allows exposing a 'gir' target which builds all GObject introspection files.
add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})

6 7 8 9 10 11 12 13 14 15
set(DocumentationDependencies
    "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml"
)

if (ENABLE_WEBKIT)
    list(APPEND DocumentationDependencies
        WebKit
        "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-docs.sgml"
        "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-sections.txt"
    )
16 17 18
    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitgtk/html/
            DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkitgtk
    )
19 20 21 22 23 24 25 26
endif ()

if (ENABLE_WEBKIT2)
    list(APPEND DocumentationDependencies
        WebKit2
        "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
        "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
    )
27 28 29
    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
            DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk
    )
30 31 32
endif ()

add_custom_command(
33
    OUTPUT "${CMAKE_BINARY_DIR}/docs-build.stamp"
34 35 36 37 38 39 40
    DEPENDS ${DocumentationDependencies}
    COMMAND CC="${CMAKE_C_COMPILER}" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc
    COMMAND touch docs-build.stamp
    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)

add_custom_target(fake-docs-target ALL
41
    DEPENDS "${CMAKE_BINARY_DIR}/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 ()
51 52 53 54

add_custom_target(check
    COMMAND "${TOOLS_DIR}/Scripts/run-gtk-tests"
)