PlatformEfl.cmake 2.07 KB
Newer Older
1
add_subdirectory(${WEBCORE_DIR}/platform/efl/DefaultTheme)
2

3 4
if (ENABLE_INSPECTOR)
    add_custom_target(
5
        web-inspector-resources ALL
6 7
        COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBINSPECTORUI_DIR}/UserInterface ${WEB_INSPECTOR_DIR}
        COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
8
        COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR}
9
        DEPENDS WebCore
10 11
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    )
12
    install(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
13 14 15 16 17
        DESTINATION ${DATA_INSTALL_DIR}
        FILES_MATCHING PATTERN "*.js"
                       PATTERN "*.html"
                       PATTERN "*.css"
                       PATTERN "*.gif"
18 19
                       PATTERN "*.png"
                       PATTERN "*.svg")
20 21 22

    find_program(UGLIFYJS_EXECUTABLE uglifyjs)
    if (UGLIFYJS_EXECUTABLE AND (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug"))
23
        file(GLOB frontend_js_files "${WEBINSPECTORUI_DIR}/UserInterface/*.js")
24 25
        set(all_js_files
            ${frontend_js_files}
26
            "${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js"
27 28 29 30 31 32 33 34 35
        )

        foreach (js_file ${all_js_files})
            get_filename_component(filename ${js_file} NAME)
            install(CODE
                "execute_process(
                    COMMAND ${UGLIFYJS_EXECUTABLE} --overwrite ${filename}
                    WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR})")
        endforeach ()
36 37 38 39 40 41 42 43 44

        file(GLOB codemirror_js_files "${WEBINSPECTORUI_DIR}/UserInterface/External/CodeMirror/*.js")
        foreach (js_file ${codemirror_js_files})
            get_filename_component(filename ${js_file} NAME)
            install(CODE
                "execute_process(
                    COMMAND ${UGLIFYJS_EXECUTABLE} --overwrite ${filename}
                    WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR}/External/CodeMirror/)")
        endforeach ()
45
    endif ()
46
endif ()