[CMake] Make WTF headers copies
[WebKit-https.git] / Source / WebDriver / CMakeLists.txt
1 set_property(DIRECTORY . PROPERTY FOLDER "WebDriver")
2
3 set(WebDriver_INCLUDE_DIRECTORIES
4     "${WEBDRIVER_DIR}"
5     "${DERIVED_SOURCES_WEBDRIVER_DIR}"
6     "${FORWARDING_HEADERS_DIR}"
7 )
8
9 set(WebDriver_SOURCES
10     CommandResult.cpp
11     HTTPServer.cpp
12     Session.cpp
13     SessionHost.cpp
14     WebDriverMain.cpp
15     WebDriverService.cpp
16 )
17
18 set(WebDriver_LIBRARIES
19     WTF
20 )
21
22 set(WebDriver_SCRIPTS
23     ${WEBKIT_DIR}/UIProcess/Automation/atoms/ElementAttribute.js
24     ${WEBKIT_DIR}/UIProcess/Automation/atoms/ElementDisplayed.js
25     ${WEBKIT_DIR}/UIProcess/Automation/atoms/FindNodes.js
26     ${WEBKIT_DIR}/UIProcess/Automation/atoms/FormElementClear.js
27     ${WEBKIT_DIR}/UIProcess/Automation/atoms/FormSubmit.js
28 )
29
30 set(JavaScriptCore_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/JavaScriptCore/Scripts")
31 MAKE_JS_FILE_ARRAYS(
32     ${DERIVED_SOURCES_WEBDRIVER_DIR}/WebDriverAtoms.cpp
33     ${DERIVED_SOURCES_WEBDRIVER_DIR}/WebDriverAtoms.h
34     WebDriver
35     WebDriver_SCRIPTS
36     Session.cpp
37 )
38 list(APPEND WebDriver_SOURCES ${DERIVED_SOURCES_WEBDRIVER_DIR}/WebDriverAtoms.cpp)
39
40 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
41
42 include_directories(${WebDriver_INCLUDE_DIRECTORIES})
43 include_directories(SYSTEM ${WebDriver_SYSTEM_INCLUDE_DIRECTORIES})
44 add_executable(WebDriver ${WebDriver_SOURCES})
45 target_link_libraries(WebDriver ${WebDriver_LIBRARIES})
46
47 if (WebDriver_Process_OUTPUT_NAME)
48     set_target_properties(WebDriver PROPERTIES OUTPUT_NAME ${WebDriver_Process_OUTPUT_NAME})
49 endif ()
50
51 install(TARGETS WebDriver
52     RUNTIME DESTINATION "${EXEC_INSTALL_DIR}"
53 )