Deprecate plasma_add_plugin

This commit is contained in:
Aleix Pol 2013-11-14 17:42:26 +01:00
parent 3ef13c53dc
commit 7088c9eb0d
12 changed files with 16 additions and 14 deletions

View File

@ -45,6 +45,7 @@ endmacro()
# plasma_add_plugin(plasma_engine_statusnotifieritem ${statusnotifieritem_engine_SRCS})
#
macro(plasma_add_plugin plugin)
message(WARNING "plasma_add_plugin() is deprecated, use add_library(MODULE) instead. You can use the porting scripts in plasma-framework/tools")
set(plugin_sources ${ARGN} )
add_library(${plugin} MODULE ${plugin_sources} )
set_target_properties(${plugin} PROPERTIES PREFIX "")

View File

@ -5,7 +5,7 @@ set(customDataContainers_SRCS
kservice_desktop_to_json(plasma-dataengine-example-customDataContainers.desktop)
plasma_add_plugin(plasma_dataengine_example_customDataContainers ${customDataContainers_SRCS})
add_library(plasma_dataengine_example_customDataContainers MODULE ${customDataContainers_SRCS})
target_link_libraries(plasma_dataengine_example_customDataContainers
Plasma
KF5::KIOCore

View File

@ -4,7 +4,7 @@ set(simpleEngine_SRCS
kservice_desktop_to_json(plasma-dataengine-example-simpleEngine.desktop)
plasma_add_plugin(plasma_dataengine_example_simpleEngine ${simpleEngine_SRCS})
add_library(plasma_dataengine_example_simpleEngine MODULE ${simpleEngine_SRCS})
target_link_libraries(plasma_dataengine_example_simpleEngine
Plasma

View File

@ -4,7 +4,7 @@ set(sourcesOnRequest_SRCS
kservice_desktop_to_json(plasma-dataengine-example-sourcesOnRequest.desktop)
plasma_add_plugin(plasma_dataengine_example_sourcesOnRequest ${sourcesOnRequest_SRCS})
add_library(plasma_dataengine_example_sourcesOnRequest MODULE ${sourcesOnRequest_SRCS})
target_link_libraries(plasma_dataengine_example_sourcesOnRequest
Plasma

View File

@ -5,7 +5,7 @@ project(RunnerExample)
set(example_SRCS homefilesrunner.cpp)
# Now make sure all files get to the right place
plasma_add_plugin(plasma_runner_example_homefiles ${example_SRCS})
add_library(plasma_runner_example_homefiles MODULE ${example_SRCS})
target_link_libraries(plasma_runner_example_homefiles KF5::Plasma KF5::KIOCore KF5::KIOWidgets)
# Install the library and .desktop file

View File

@ -13,7 +13,7 @@ set(plasma_kpart_SRCS
plasmakpart.cpp
)
plasma_add_plugin(plasma-kpart ${plasma_kpart_SRCS})
add_library(plasma-kpart MODULE ${plasma_kpart_SRCS})
target_link_libraries(plasma-kpart Qt5::Script KF5::Plasma KF5::KIOCore KF5::KIOWidgets ${X11_LIBRARIES} KF5::KParts )

View File

@ -11,7 +11,7 @@ set(test_SRCS
)
qt5_wrap_ui(test_SRCS config.ui)
plasma_add_plugin(plasma_containmentactions_test ${test_SRCS})
add_library(plasma_containmentactions_test MODULE ${test_SRCS})
target_link_libraries(plasma_containmentactions_test ${Plasma_LIBRARIES} KF5::KIOCore KF5::KIOWidgets)
install(TARGETS plasma_containmentactions_test DESTINATION ${PLUGIN_INSTALL_DIR})

View File

@ -7,7 +7,7 @@ include(KDE4Defaults)
set(testengine_engine_SRCS
testengine.cpp)
plasma_add_plugin(plasma_engine_testengine
add_library(plasma_engine_testengine MODULE
${testengine_engine_SRCS})
target_link_libraries(plasma_engine_testengine

View File

@ -20,7 +20,7 @@ MACRO(PLASMA_UNIT_TESTS)
PlasmaQuick
)
if(QT_QTOPENGL_FOUND)
target_link_libraries(${_testname} ${QT_QTOPENGL_LIBRARY})
target_link_libraries(${_testname} Qt5::OpenGL)
endif()
add_test(plasma-${_testname} ${_testname})
ecm_mark_as_test(${_testname})

View File

@ -9,7 +9,7 @@ qt5_add_dbus_adaptor (
platformstatus.h PlatformStatus
)
plasma_add_plugin(kded_platformstatus ${kded_platformstatus_SRCS} )
add_library(kded_platformstatus MODULE ${kded_platformstatus_SRCS} )
target_link_libraries(
kded_platformstatus

View File

@ -49,7 +49,7 @@ set(simple_javascript_engine_SRCS
include_directories(${PHONON_INCLUDES})
plasma_add_plugin(plasma_appletscript_simple_javascript ${simple_javascript_engine_SRCS})
add_library(plasma_appletscript_simple_javascript MODULE ${simple_javascript_engine_SRCS})
target_link_libraries(plasma_appletscript_simple_javascript
${KCore_LIBRARIES}
@ -75,7 +75,7 @@ set(javascript_runner_engine_SRCS
simplebindings/i18n.cpp
)
plasma_add_plugin(plasma_runnerscript_javascript ${javascript_runner_engine_SRCS})
add_library(plasma_runnerscript_javascript MODULE ${javascript_runner_engine_SRCS})
target_link_libraries(plasma_runnerscript_javascript
${KCore_LIBRARIES}
@ -100,7 +100,7 @@ set(javascript_dataengine_engine_SRCS
simplebindings/i18n.cpp
simplebindings/qscriptnonguibookkeeping.cpp
)
plasma_add_plugin(plasma_dataenginescript_javascript ${javascript_dataengine_engine_SRCS})
add_library(plasma_dataenginescript_javascript MODULE ${javascript_dataengine_engine_SRCS})
target_link_libraries(plasma_dataenginescript_javascript
${KCore_LIBRARIES}
@ -118,7 +118,7 @@ set(javascript_addon_packagestructure_SRCS
common/javascriptaddonpackagestructure.cpp
)
plasma_add_plugin(plasma_packagestructure_javascriptaddon ${javascript_addon_packagestructure_SRCS})
add_library(plasma_packagestructure_javascriptaddon MODULE ${javascript_addon_packagestructure_SRCS})
target_link_libraries(plasma_packagestructure_javascriptaddon ${Plasma_LIBRARIES})
install(TARGETS plasma_packagestructure_javascriptaddon DESTINATION ${PLUGIN_INSTALL_DIR})

View File

@ -11,7 +11,8 @@
for FS in `find $PWD -type f -name 'CMakeLists.txt'`; do
perl -p -i -e 's/kde4_add_plugin/plasma_add_plugin/g' $FS
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_kdeinit_executable/kf5_add_kdeinit_executable/g' $FS
perl -p -i -e 's/kde4_add_library/add_library/g' $FS