[CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
[WebKit-https.git] / Source / PlatformEfl.cmake
1 add_subdirectory(${WEBCORE_DIR}/platform/efl/DefaultTheme)
2
3 if (ENABLE_INSPECTOR)
4     add_custom_target(
5         web-inspector-resources ALL
6         COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WEB_INSPECTOR_DIR}
7         COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
8         COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR}
9         COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}
10         DEPENDS WebCore
11         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
12     )
13     install(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
14         DESTINATION ${DATA_INSTALL_DIR}
15         FILES_MATCHING PATTERN "*.js"
16                        PATTERN "*.html"
17                        PATTERN "*.css"
18                        PATTERN "*.gif"
19                        PATTERN "*.png")
20
21     find_program(UGLIFYJS_EXECUTABLE uglifyjs)
22     if (UGLIFYJS_EXECUTABLE AND (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug"))
23         file(GLOB frontend_js_files "${WEBCORE_DIR}/inspector/front-end/*.js")
24         set(all_js_files
25             ${frontend_js_files}
26             "${WEBCORE_DIR}/English.lproj/localizedStrings.js"
27             "${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendCommands.js"
28         )
29
30         foreach (js_file ${all_js_files})
31             get_filename_component(filename ${js_file} NAME)
32             install(CODE
33                 "execute_process(
34                     COMMAND ${UGLIFYJS_EXECUTABLE} --overwrite ${filename}
35                     WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${WEB_INSPECTOR_DIR})")
36         endforeach ()
37     endif ()
38 endif ()