# mwm: plugins/CMakeLists.txt

include_directories(
    ${mwm_SOURCE_DIR}/libmwm
    ${mwm_SOURCE_DIR}/mwm
)

add_library(mwm_wallpaper MODULE wallpaper.c)
set_target_properties(mwm_wallpaper PROPERTIES PREFIX "")
install(TARGETS mwm_wallpaper DESTINATION lib${LIB_SUFFIX}/mwm/plugins)


# mwm: plugins/CMakeLists.txt

set(MWM_PLUGINS wallpaper)

include_directories(
    ${mwm_SOURCE_DIR}/libmwm
    ${mwm_SOURCE_DIR}/mwm
)

foreach(PLUGIN ${MWM_PLUGINS})
    add_library(mwm_${PLUGIN} MODULE ${PLUGIN}.c)
    set_target_properties(mwm_${PLUGIN} PROPERTIES PREFIX "")
    install(TARGETS mwm_${PLUGIN} DESTINATION lib${LIB_SUFFIX}/mwm/plugins)
endforeach()


Use a for loop for plugins
Use a for loop for plugins
