diff --git a/tools/kf5-lib-prefix-rename-test/.gitignore b/tools/kf5-lib-prefix-rename-test/.gitignore new file mode 100644 index 000000000..53752db25 --- /dev/null +++ b/tools/kf5-lib-prefix-rename-test/.gitignore @@ -0,0 +1 @@ +output diff --git a/tools/kf5-lib-prefix-rename-test/expected/CMakeLists.txt b/tools/kf5-lib-prefix-rename-test/expected/CMakeLists.txt new file mode 100644 index 000000000..981b4116c --- /dev/null +++ b/tools/kf5-lib-prefix-rename-test/expected/CMakeLists.txt @@ -0,0 +1,27 @@ +find_package(KF5 CONFIG REQUIRED IdleTime ItemModels WidgetsAddons WindowSystem Codecs Archive CoreAddons Solid ThreadWeaver GlobalAccel + Config Auth JS Wallet DBusAddons I18n GuiAddons ConfigWidgets + Service ItemViews Notifications IconThemes Completion JobWidgets Sonnet TextWidgets XmlGui Crash + Bookmarks Declarative UnitConversion Parts Kross KIO) + +find_package(KF5CoreAddons REQUIRED) + +find_package(KF5Solid REQUIRED) + +find_package(KF5Declarative REQUIRED NO_MODULE) + +include(KF5PlasmaMacros) +include(KF5PlasmaMacros.cmake) + +target_link_libraries(Foo + Qt5::Test + Qt5::Declarative + KF5::Plasma + KF5::Archive KF5::CoreAddons + KF5::ConfigGui + KF5::I18n + KF5::KIOCore + KF5::Service + KF5::PlasmaQuick + ) + +target_link_libraries(plasma-example-kpart-shell KF5::Plasma KF5::Parts) diff --git a/tools/kf5-lib-prefix-rename-test/src/CMakeLists.txt b/tools/kf5-lib-prefix-rename-test/src/CMakeLists.txt new file mode 100644 index 000000000..03634eff5 --- /dev/null +++ b/tools/kf5-lib-prefix-rename-test/src/CMakeLists.txt @@ -0,0 +1,27 @@ +find_package(KF5 CONFIG REQUIRED KIdleTime ItemModels KWidgetsAddons KWindowSystem KCodecs KArchive KCoreAddons Solid ThreadWeaver KF5GlobalAccel + KConfig KAuth KJS KWallet KDBusAddons KI18n KGuiAddons KConfigWidgets + KService ItemViews KNotifications KIconThemes KCompletion KJobWidgets Sonnet KTextWidgets XmlGui KCrash + KBookmarks KDeclarative KUnitConversion KParts Kross KIO) + +find_package(KCoreAddons REQUIRED) + +find_package(Solid REQUIRED) + +find_package(KDeclarative REQUIRED NO_MODULE) + +include(PlasmaMacros) +include(PlasmaMacros.cmake) + +target_link_libraries(Foo + Qt5::Test + Qt5::Declarative + KF5::Plasma + KF5::KArchive KF5::KCoreAddons + KF5::KConfigGui + KF5::KI18n + KF5::KIOCore + KF5::KService + KF5::PlasmaQuick + ) + +target_link_libraries(plasma-example-kpart-shell KF5::Plasma KF5::KParts) diff --git a/tools/kf5-lib-prefix-rename-test/test.sh b/tools/kf5-lib-prefix-rename-test/test.sh new file mode 100755 index 000000000..e5d958263 --- /dev/null +++ b/tools/kf5-lib-prefix-rename-test/test.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +rm -rf output +cp -r src output +cd output +echo "# Running" +kf5-lib-prefix-rename +cd .. +echo "# Results" +for file in expected/* ; do + echo "## $file" + diff -u $file output/$(basename $file) +done