From 92b3c2dcff3e85ad3d455f6ab845d9a97d3b525b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 7 Dec 2020 12:22:15 +0200 Subject: Rewrite meson build scripts into cmakelists --- src/webengine/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/webengine/CMakeLists.txt (limited to 'src/webengine/CMakeLists.txt') diff --git a/src/webengine/CMakeLists.txt b/src/webengine/CMakeLists.txt new file mode 100644 index 0000000..5d2769d --- /dev/null +++ b/src/webengine/CMakeLists.txt @@ -0,0 +1,22 @@ +add_library(webengine INTERFACE) +target_sources(webengine INTERFACE + webprofile.h webprofile.cpp webprofilemanager.h webprofilemanager.cpp + webpage.h webpage.cpp + webview.h webview.cpp webviewcontextmenu.h webviewcontextmenu.cpp + urlinterceptor.h urlinterceptor.cpp) +target_include_directories(webengine INTERFACE ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(webengine INTERFACE Qt5::WebEngineWidgets fmt) + +# tests +add_executable(profile_test test/profile.cpp) +target_link_libraries(profile_test PRIVATE webengine Catch2::Catch2) +#target_sanitize(profile_test) + +add_executable(profilemanager_test test/profilemanager.cpp) +target_link_libraries(profilemanager_test PRIVATE webengine Catch2::Catch2) +#target_sanitize(profilemanager_test) + +add_test(NAME webengine_profile COMMAND profile_test) +add_test(NAME webengine_profilemanager COMMAND profilemanager_test) +set_tests_properties(webengine_profile webengine_profilemanager PROPERTIES + ENVIRONMENT "PROFILE=${CMAKE_CURRENT_SOURCE_DIR}/test/testing.profile") \ No newline at end of file -- cgit v1.2.1