d5f5ec684e1caaf4061bc2446081ee63da625aa7
[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 )
7
8 set(WebDriver_SOURCES
9     CommandResult.cpp
10     HTTPServer.cpp
11     Session.cpp
12     SessionHost.cpp
13     WebDriverMain.cpp
14     WebDriverService.cpp
15 )
16
17 set(WebDriver_LIBRARIES
18     WTF
19 )
20
21 set(WebDriver_SCRIPTS
22     ${WEBKIT_DIR}/UIProcess/Automation/atoms/ElementAttribute.js
23     ${WEBKIT_DIR}/UIProcess/Automation/atoms/ElementDisplayed.js
24     ${WEBKIT_DIR}/UIProcess/Automation/atoms/FindNodes.js
25     ${WEBKIT_DIR}/UIProcess/Automation/atoms/FormElementClear.js
26     ${WEBKIT_DIR}/UIProcess/Automation/atoms/FormSubmit.js
27 )
28
29 set(JavaScriptCore_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/JavaScriptCore/Scripts")
30 MAKE_JS_FILE_ARRAYS(
31     ${DERIVED_SOURCES_WEBDRIVER_DIR}/WebDriverAtoms.cpp
32     ${DERIVED_SOURCES_WEBDRIVER_DIR}/WebDriverAtoms.h
33     WebDriver
34     WebDriver_SCRIPTS
35     Session.cpp
36 )
37 list(APPEND WebDriver_SOURCES ${DERIVED_SOURCES_WEBDRIVER_DIR}/WebDriverAtoms.cpp)
38
39 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
40
41 include_directories(${WebDriver_INCLUDE_DIRECTORIES})
42 include_directories(SYSTEM ${WebDriver_SYSTEM_INCLUDE_DIRECTORIES})
43 add_executable(WebDriver ${WebDriver_SOURCES})
44 target_link_libraries(WebDriver ${WebDriver_LIBRARIES})
45
46 if (WebDriver_Process_OUTPUT_NAME)
47     set_target_properties(WebDriver PROPERTIES OUTPUT_NAME ${WebDriver_Process_OUTPUT_NAME})
48 endif ()
49
50 install(TARGETS WebDriver
51     RUNTIME DESTINATION "${EXEC_INSTALL_DIR}"
52 )