run-jsc-benchmarks geomean of preferred means shouldn't print the VMs header twice
[WebKit-https.git] / Source / PlatformEfl.cmake
1 add_subdirectory(${WEBCORE_DIR}/platform/efl/DefaultTheme)
2
3 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is
4 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.
5 add_custom_command(
6     OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
7     DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
8     COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
9 )
10
11 add_custom_target(
12     web-inspector-resources ALL
13     COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBINSPECTORUI_DIR}/UserInterface ${WEB_INSPECTOR_DIR}
14     COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol
15     COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
16     COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR}
17     DEPENDS JavaScriptCore WebCore ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
18     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
19 )
20 install(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
21     DESTINATION ${DATA_INSTALL_DIR}
22     FILES_MATCHING PATTERN "*.js"
23                    PATTERN "*.html"
24                    PATTERN "*.css"
25                    PATTERN "*.gif"
26                    PATTERN "*.png"
27                    PATTERN "*.svg")
28
29 find_program(UGLIFYJS_EXECUTABLE uglifyjs)
30 if (UGLIFYJS_EXECUTABLE AND (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug"))
31     file(GLOB frontend_js_files "${WEBINSPECTORUI_DIR}/UserInterface/*.js")
32     set(all_js_files
33         ${frontend_js_files}
34         "${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js"
35     )
36
37     foreach (js_file ${all_js_files})
38         get_filename_component(filename ${js_file} NAME)
39         install(CODE
40             "execute_process(
41                 COMMAND ${UGLIFYJS_EXECUTABLE} --overwrite ${filename}
42                 WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR})")
43     endforeach ()
44
45     file(GLOB codemirror_js_files "${WEBINSPECTORUI_DIR}/UserInterface/External/CodeMirror/*.js")
46     foreach (js_file ${codemirror_js_files})
47         get_filename_component(filename ${js_file} NAME)
48         install(CODE
49             "execute_process(
50                 COMMAND ${UGLIFYJS_EXECUTABLE} --overwrite ${filename}
51                 WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR}/External/CodeMirror/)")
52     endforeach ()
53 endif ()