set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI") set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WTF") # This is necessary because it is possible to build TestWebKitAPI with WebKit2 # disabled and this triggers the inclusion of the WebKit2 headers. add_definitions(-DBUILDING_WEBKIT2__) add_custom_target(TestWebKitAPI-forwarding-headers COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${TESTWEBKITAPI_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe --platform soup DEPENDS webkit2wpe-forwarding-headers ) set(ForwardingHeadersForTestWebKitAPI_NAME TestWebKitAPI-forwarding-headers) include_directories( ${FORWARDING_HEADERS_DIR} ${FORWARDING_HEADERS_DIR}/JavaScriptCore ) include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS} ) set(test_main_SOURCES ${TESTWEBKITAPI_DIR}/wpe/main.cpp ) set(bundle_harness_SOURCES ${TESTWEBKITAPI_DIR}/wpe/InjectedBundleControllerWPE.cpp ${TESTWEBKITAPI_DIR}/wpe/PlatformUtilitiesWPE.cpp ) # TestWTF list(APPEND TestWTF_SOURCES ${TESTWEBKITAPI_DIR}/Tests/WTF/glib/GUniquePtr.cpp ${TESTWEBKITAPI_DIR}/Tests/WTF/glib/WorkQueueGLib.cpp ) # TestWebCore add_executable(TestWebCore ${test_main_SOURCES} ${TESTWEBKITAPI_DIR}/TestsController.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/HTMLParserIdioms.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/MIMETypeRegistry.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/URL.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBuffer.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/SharedBufferTest.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/FileSystem.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/PublicSuffix.cpp ) target_link_libraries(TestWebCore ${test_webcore_LIBRARIES} -Wl,--start-group WebCore WebCoreDerivedSources WebCorePlatformWPE -Wl,--end-group) add_dependencies(TestWebCore ${ForwardingHeadersForTestWebKitAPI_NAME}) add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebCore/TestWebCore) set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60) set_target_properties(TestWebCore PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/WebCore)