diff --git a/tools/port-cmake-style.sh b/tools/port-cmake-style.sh index c87543a94..cb959530d 100644 --- a/tools/port-cmake-style.sh +++ b/tools/port-cmake-style.sh @@ -1,4 +1,8 @@ for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do + #all commands should be lowercase + #http://techbase.kde.org/Policies/CMake_Coding_Style#Upper.2Flower_casing + perl -p -i -e 's/^( *)([0-9A-Z_]*)( *)\(/$1.lc($2).$3."("/ge' $FS + #removes the predicate of endif and else in cmake # http://techbase.kde.org/Policies/CMake_Coding_Style#End_commands perl -p -i -e 's/endif( *)\(.*\)/endif\1()/g' $FS diff --git a/tools/port-cmake.sh b/tools/port-cmake.sh index 934636452..95880ecb2 100755 --- a/tools/port-cmake.sh +++ b/tools/port-cmake.sh @@ -13,7 +13,8 @@ for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do perl -p -i -e 's/plasma_add_plugin\(([a-zA-Z_\-]+) /add_library(\1 MODULE /g' $FS perl -p -i -e 's/kde4_add_plugin\(([a-zA-Z_\-]+) /add_library(\1 MODULE /g' $FS - perl -p -i -e 's/kde4_add_ui_files/qt5_wrap_ui/g' $FS +# perl -p -i -e 's/kde4_add_ui_files/qt5_wrap_ui/g' $FS #TODO: need a ki18n_wrap_ui, otherwise changes in the cpp files are needed + perl -p -i -e 's/qt4_wrap_ui/qt5_wrap_ui/g' $FS perl -p -i -e 's/kde4_add_kdeinit_executable/kf5_add_kdeinit_executable/g' $FS perl -p -i -e 's/kde4_add_library/add_library/g' $FS perl -p -i -e 's/kde4_add_executable/add_executable/g' $FS @@ -26,9 +27,10 @@ for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do perl -p -i -e 's/\$\{KDE4_PLASMA_LIBS\}/KF5::Plasma/g' $FS perl -p -i -e 's/\$\{KDE4_KDECORE_LIBS\}//g' $FS perl -p -i -e 's/\$\{KDE4_SOLID_LIBS\}/KF5\:\:Solid/g' $FS - perl -p -i -e 's/\$\{KDE4_KIO_LIBS\}/KF5\:\:KIOCore\ KF5\:\:KIOWidgets/g' $FS + perl -p -i -e 's/\$\{KDE4_KIO_LIBS\}/KF5\:\:KIOWidgets/g' $FS perl -p -i -e 's/\$\{KDE4_KNOTIFYCONFIG_LIBRARY\}/KF5\:\:KNotifyConfig/g' $FS perl -p -i -e 's/\$\{KDE4_KNEWSTUFF3_LIBRARY\}/KF5\:\:KNewStuff/g' $FS + perl -p -i -e 's/\$\{KDE4_KNEWSTUFF3_LIBS\}/KF5\:\:KNewStuff/g' $FS perl -p -i -e 's/\$\{KDE4_KDESU_LIBS\}/KF5\:\:KDESu/g' $FS perl -p -i -e 's/\$\{KDE4_KTEXTEDITOR_LIBS\}/KF5\:\:KTextEditor/g' $FS perl -p -i -e 's/\$\{KDE4_KPTY_LIBS\}/KF5\:\:KPty/g' $FS @@ -37,6 +39,12 @@ for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do perl -p -i -e 's/\$\{KCoreAddons_LIBRARIES\}/KF5\:\:KCoreAddons/g' $FS perl -p -i -e 's/\$\{KI18n_LIBRARIES\}/KF5\:\:KI18n/g' $FS perl -p -i -e 's/\$\{KArchive_LIBRARIES\}/KF5\:\:KArchive/g' $FS + perl -p -i -e 's/\$\{Plasma_LIBRARIES\}/KF5\:\:Plasma/g' $FS + perl -p -i -e 's/\$\{KNotifications_LIBRARIES\}/KF5\:\:KNotifications/g' $FS + perl -p -i -e 's/\$\{KIconThemes_LIBRARIES\}/KF5\:\:KIconThemes/g' $FS + perl -p -i -e 's/\$\{KWindowSystem_LIBRARIES\}/KF5\:\:KWindowSystem/g' $FS + perl -p -i -e 's/\$\{KConfigWidgets_LIBRARIES\}/KF5\:\:KConfigWidgets/g' $FS + perl -p -i -e 's/\$\{QT_QTXML_LIBRARY\}/Qt5\:\:Xml/g' $FS perl -p -i -e 's/\$\{QT_QTGUI_LIBRARY\}/Qt5\:\:Gui/g' $FS perl -p -i -e 's/\$\{QT_QTNETWORK_LIBRARY\}/Qt5\:\:Network/g' $FS @@ -45,6 +53,11 @@ for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do perl -p -i -e 's/\$\{QT_QTTEST_LIBRARY\}/Qt5\:\:Test/g' $FS perl -p -i -e 's/\$\{QT_QTSVG_LIBRARY\}/Qt5\:\:Svg/g' $FS perl -p -i -e 's/\$\{QT_QTOPENGL_LIBRARY\}/Qt5\:\:OpenGL/g' $FS + perl -p -i -e 's/\$\{QT_QTSQL_LIBRARY\}/Qt5\:\:Sql/g' $FS perl -p -i -e 's/\$\{QT_QTDBUS_LIBRARY\}/Qt5\:\:DBus/g' $FS + perl -p -i -e 's/\$\{Qt5DBus_LIBRARIES\}/Qt5\:\:DBus/g' $FS + perl -p -i -e 's/\$\{Qt5Quick_LIBRARIES\}/Qt5\:\:Quick/g' $FS + perl -p -i -e 's/\$\{Qt5Qml_LIBRARIES\}/Qt5\:\:Qml/g' $FS + perl -p -i -e 's/\$\{Qt5Widgets_LIBRARIES\}/Qt5\:\:Widgets/g' $FS done