[JSCOnly] Implement RunLoop and remove glib dependency
[WebKit.git] / Tools / TestWebKitAPI / PlatformJSCOnly.cmake
1 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI")
2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WTF")
3
4 # This is necessary because JSCOnly port does not support WebCore, WebKit and WebKit2.
5 # To build TestWTF, we need this flag not to include WebKit related headers except
6 # for WTF and JavaScriptCore.
7 add_definitions(-DBUILDING_JSCONLY__)
8
9 include_directories(
10     ${DERIVED_SOURCES_DIR}/ForwardingHeaders
11     "${WTF_DIR}/icu"
12 )
13
14 if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
15     include_directories(SYSTEM
16         ${GLIB_INCLUDE_DIRS}
17     )
18 endif ()
19
20 set(test_main_SOURCES
21     ${TESTWEBKITAPI_DIR}/jsconly/main.cpp
22 )
23
24 list(APPEND TestWTF_SOURCES
25     ${TESTWEBKITAPI_DIR}/jsconly/PlatformUtilitiesJSCOnly.cpp
26     ${TESTWEBKITAPI_DIR}/Tests/WTF/RunLoop.cpp
27 )