# velox: modules/CMakeLists.txt

set(VELOX_MODULES
    tile
    grid
    wallpaper
    spawn
    mpd
    alsa
    bar
    pulseaudio
)

include_directories(${velox_SOURCE_DIR})

foreach(module ${VELOX_MODULES})
    string(TOUPPER ${module} module_upper)
    if(ENABLE_${module_upper})
        add_library(${module} MODULE ${module}.c)
        set_target_properties(${module} PROPERTIES PREFIX "")
        install(TARGETS ${module} DESTINATION lib${LIB_SUFFIX}/velox/modules)
    endif(ENABLE_${module_upper})
endforeach(module)

if(ENABLE_MPD)
    target_link_libraries(mpd ${LibMPDClient_LIBRARIES})
endif(ENABLE_MPD)

if(ENABLE_ALSA)
    target_link_libraries(alsa ${ALSA_LIBRARIES})
    include_directories(${ALSA_INCLUDE_DIR})
endif(ENABLE_ALSA)

if(ENABLE_PULSEAUDIO)
    target_link_libraries(pulseaudio ${LibPulse_LIBRARIES})
    include_directories(${LibPulse_INCLUDE_DIR})
endif(ENABLE_PULSEAUDIO)


# velox: modules/CMakeLists.txt

set(VELOX_MODULES
    tile
    grid
    wallpaper
    spawn
    mpd
    alsa
    bar
    pulseaudio
)

include_directories(${velox_SOURCE_DIR})

foreach(module ${VELOX_MODULES})
    string(TOUPPER ${module} module_upper)
    if(ENABLE_${module_upper})
        add_library(${module} MODULE ${module}.c)
        set_target_properties(${module} PROPERTIES PREFIX "")
        install(TARGETS ${module} DESTINATION lib${LIB_SUFFIX}/velox/modules)
    endif(ENABLE_${module_upper})
endforeach(module)

if(ENABLE_MPD)
    target_link_libraries(mpd ${LIBMPDCLIENT_LIBRARIES})
endif(ENABLE_MPD)

if(ENABLE_ALSA)
    target_link_libraries(alsa ${ALSA_LIBRARIES})
    include_directories(${ALSA_INCLUDE_DIR})
endif(ENABLE_ALSA)

if(ENABLE_PULSEAUDIO)
    target_link_libraries(pulseaudio ${LIBPULSE_LIBRARIES})
    include_directories(${LibPulse_INCLUDE_DIR})
endif(ENABLE_PULSEAUDIO)


Fix mpd and pulseaudio module libs
Fix mpd and pulseaudio module libs
