Verified Commit f535f798 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Use kcoreaddons_add_plugin to create plugins

This allows one to load the plugins from the build dir
and saves us the explicit installing.
parent 776f000e
......@@ -8,10 +8,7 @@ set(assignvalues_SRCS
../../logging.cpp
)
ki18n_wrap_ui(assignvalues_SRCS assignvalueswidget.ui)
add_library(assignvaluesplugin
MODULE
${assignvalues_SRCS}
)
kcoreaddons_add_plugin(assignvaluesplugin SOURCES ${assignvalues_SRCS} INSTALL_NAMESPACE "rocs/editorplugins")
target_link_libraries(assignvaluesplugin
PUBLIC
......@@ -21,5 +18,3 @@ target_link_libraries(assignvaluesplugin
kde_source_files_enable_exceptions(assignvalueswidget.cpp)
ecm_optional_add_subdirectory(autotests)
install(TARGETS assignvaluesplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/editorplugins)
......@@ -15,10 +15,7 @@ set(generategraph_SRCS
kde_source_files_enable_exceptions(generategraphplugin.cpp)
ki18n_wrap_ui(generategraph_SRCS generategraphwidget.ui)
add_library(generategraphplugin
MODULE
${generategraph_SRCS}
)
kcoreaddons_add_plugin(generategraphplugin SOURCES ${generategraph_SRCS} INSTALL_NAMESPACE "rocs/editorplugins")
target_link_libraries(generategraphplugin
PUBLIC
......@@ -27,5 +24,3 @@ target_link_libraries(generategraphplugin
)
ecm_optional_add_subdirectory(autotests)
install(TARGETS generategraphplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/editorplugins)
......@@ -8,10 +8,8 @@ set(transformedges_SRCS
../../logging.cpp
)
ki18n_wrap_ui(transformedges_SRCS transformedgeswidget.ui)
add_library(transformedgesplugin
MODULE
${transformedges_SRCS}
)
kcoreaddons_add_plugin(transformedgesplugin SOURCES ${transformedges_SRCS} INSTALL_NAMESPACE "rocs/editorplugins")
target_link_libraries(transformedgesplugin
PUBLIC
......@@ -20,5 +18,3 @@ target_link_libraries(transformedgesplugin
)
ecm_optional_add_subdirectory(autotests)
install(TARGETS transformedgesplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/editorplugins)
......@@ -12,7 +12,7 @@ set(dotformat_SRCS
# Boost requires exceptions
kde_source_files_enable_exceptions(dotgrammar.cpp)
add_library(dotfileformat MODULE ${dotformat_SRCS})
kcoreaddons_add_plugin(dotfileformat SOURCES ${dotformat_SRCS} INSTALL_NAMESPACE "rocs/fileformats")
target_link_libraries(dotfileformat
PUBLIC
......@@ -22,6 +22,4 @@ target_link_libraries(dotfileformat
rocsgraphtheory
)
install(TARGETS dotfileformat DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/fileformats)
ecm_optional_add_subdirectory(autotests)
......@@ -9,7 +9,7 @@ set(gmlformat_SRCS
../../logging.cpp
)
add_library(gmlfileformat MODULE ${gmlformat_SRCS})
kcoreaddons_add_plugin(gmlfileformat SOURCES ${gmlformat_SRCS} INSTALL_NAMESPACE "rocs/fileformats")
target_link_libraries(gmlfileformat
PUBLIC
......@@ -22,6 +22,4 @@ target_link_libraries(gmlfileformat
# Boost::spirit requires exceptions
kde_target_enable_exceptions(gmlfileformat PRIVATE)
install(TARGETS gmlfileformat DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/fileformats)
ecm_optional_add_subdirectory(autotests)
......@@ -7,7 +7,7 @@ set(rocs1format_SRCS
../../logging.cpp
)
add_library(rocs1fileformat MODULE ${rocs1format_SRCS})
kcoreaddons_add_plugin(rocs1fileformat SOURCES ${rocs1format_SRCS} INSTALL_NAMESPACE "rocs/fileformats")
target_link_libraries(rocs1fileformat
PUBLIC
......@@ -17,6 +17,4 @@ target_link_libraries(rocs1fileformat
rocsgraphtheory
)
install(TARGETS rocs1fileformat DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/fileformats)
ecm_optional_add_subdirectory(autotests)
......@@ -7,7 +7,7 @@ set(rocs2format_SRCS
../../logging.cpp
)
add_library(rocs2fileformat MODULE ${rocs2format_SRCS})
kcoreaddons_add_plugin(rocs2fileformat SOURCES ${rocs2format_SRCS} INSTALL_NAMESPACE "rocs/fileformats")
target_link_libraries(rocs2fileformat
PUBLIC
......@@ -17,6 +17,4 @@ target_link_libraries(rocs2fileformat
rocsgraphtheory
)
install(TARGETS rocs2fileformat DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/fileformats)
ecm_optional_add_subdirectory(autotests)
......@@ -7,12 +7,10 @@ set(tgfformat_SRCS
../../logging.cpp
)
add_library(tgffileformat MODULE ${tgfformat_SRCS})
kcoreaddons_add_plugin(tgffileformat SOURCES ${tgfformat_SRCS} INSTALL_NAMESPACE "rocs/fileformats")
target_link_libraries(tgffileformat
rocsgraphtheory
)
install(TARGETS tgffileformat DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/fileformats)
ecm_optional_add_subdirectory(autotests)
......@@ -7,12 +7,10 @@ set(tikzformat_SRCS
../../logging.cpp
)
add_library(tikzfileformat MODULE ${tikzformat_SRCS})
kcoreaddons_add_plugin(tikzfileformat SOURCES ${tikzformat_SRCS} INSTALL_NAMESPACE "rocs/fileformats")
target_link_libraries(tikzfileformat
rocsgraphtheory
)
install(TARGETS tikzfileformat DESTINATION ${KDE_INSTALL_PLUGINDIR}/rocs/fileformats)
ecm_optional_add_subdirectory(autotests)
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