Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5ba0a08b authored by Stefan Brüns's avatar Stefan Brüns

[Bookmarks Runner] Cleanup tests CMakeList

Summary:
Build the test dependencies as static library. Remove duplicate and
commented out lines. Use ecm_add_test instead of setting up everything
manually.

Test Plan: make && ctest

Reviewers: #frameworks, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D16404
parent 6b3709ac
......@@ -14,28 +14,41 @@ set(EXTERNAL_LIBS
KF5::Bookmarks
)
set(krunner_bookmarksrunner_SRCS
browserfactory.cpp
set(krunner_bookmarks_common_SRCS
bookmarkmatch.cpp
faviconfromblob.cpp
favicon.cpp
fetchsqlite.cpp
browsers/opera.cpp
bookmarksrunner.cpp
browsers/kdebrowser.cpp
browsers/firefox.cpp
)
set(krunner_bookmarksrunner_SRCS
${krunner_bookmarksrunner_SRCS}
${krunner_bookmarks_common_SRCS}
bookmarksrunner.cpp
browserfactory.cpp
browsers/chromefindprofile.cpp
browsers/chrome.cpp
browsers/firefox.cpp
browsers/kdebrowser.cpp
browsers/opera.cpp
)
add_library(krunner_bookmarksrunner MODULE ${krunner_bookmarksrunner_SRCS})
target_link_libraries(krunner_bookmarksrunner ${EXTERNAL_LIBS})
set(krunner_bookmarks_test_SRCS
${krunner_bookmarks_common_SRCS}
browsers/chromefindprofile.cpp
browsers/chrome.cpp
)
add_library(krunner_bookmarks_test STATIC ${krunner_bookmarks_test_SRCS})
target_link_libraries(krunner_bookmarks_test
Qt5::Sql
KF5::KIOCore
KF5::Runner
)
install(TARGETS krunner_bookmarksrunner DESTINATION ${KDE_INSTALL_PLUGINDIR} )
......
include(ECMMarkAsTest)
include(ECMAddTests)
set( testChromeBookmarks_SRCS testchromebookmarks.cpp
../browsers/chrome.cpp
../faviconfromblob.cpp
../browsers/chromefindprofile.cpp
../bookmarkmatch.cpp
../favicon.cpp
../fetchsqlite.cpp
)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/.. )
add_executable( testChromeBookmarks ${testChromeBookmarks_SRCS} )
#add_executable( testChromeBookmarksNAME plasma-runner-bookmarks-TestChromeBookmarks ${testChromeBookmarks_SRCS} )
add_test(NAME testChromeBookmarks COMMAND testChromeBookmarks)
ecm_mark_as_test(testChromeBookmarks)
#add_test( testChromeBookmarks TESTNAME plasma-runner-bookmarks-TestChromeBookmarks ${testChromeBookmarks_SRCS} )
target_link_libraries( testChromeBookmarks
Qt5::Gui
Qt5::Test
Qt5::Sql
KF5::Runner
KF5::KIOCore
ecm_add_test(testchromebookmarks.cpp TEST_NAME testChromeBookmarks
LINK_LIBRARIES Qt5::Test krunner_bookmarks_test
)
add_test(NAME plasma-runner-bookmarks-TestChromeBookmarks COMMAND testChromeBookmarks)
ecm_mark_as_test(testChromeBookmarks)
file(COPY chrome-config-home DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment