X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=55bc047cb2ac4ff53ccb06f2220e97bb9bee519b;hb=8c8a801130da286ce50cc3861b1725f7187b5fa8;hp=7156d4f42583253af70562ea7ee105a405efe468;hpb=6c2aef81c4182695487fabbd19c5c0a84409b49f;p=staging%2Fagl-audio-plugin.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 7156d4f..55bc047 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,18 +27,19 @@ add_compile_options(-ffunction-sections -fdata-sections) ########################################################################### -PKG_CHECK_MODULES(pulseaudio-module-devel REQUIRED pulseaudio-module-devel) +PKG_CHECK_MODULES(dependencies REQUIRED json-c pulseaudio-module-devel) -ADD_DEFINITIONS(${pulseaudio-module-devel_CFLAGS}) -SET(include_dirs ${INCLUDE_DIRS} ${pulseaudio-module-devel_INCLUDE_DIRS}) -SET(link_libraries ${LINK_LIBRARIES} ${pulseaudio-module-devel_LIBRARIES}) -STRING(REGEX REPLACE ";" " " link_flags "${pulseaudio-module-devel_LDFLAGS}" "") +ADD_DEFINITIONS(${dependencies_CFLAGS}) +SET(include_dirs ${INCLUDE_DIRS} ${dependencies_INCLUDE_DIRS}) +SET(link_libraries ${LINK_LIBRARIES} ${dependencies_LIBRARIES}) +STRING(REGEX REPLACE ";" " " link_flags "${dependencies_LDFLAGS}" "") -SET(plugin_install_dir ${CMAKE_INSTALL_LIBDIR}/pulse-6.0/modules) +SET(PULSE_PV "6.0" CACHE STRING "PulseAudio version") +SET(plugin_install_dir ${CMAKE_INSTALL_LIBDIR}/pulse-${PULSE_PV}/modules) ############################################################ -ADD_LIBRARY(agl-audio-plugin MODULE module.c audiomgr.c classify.c discover.c loopback.c node.c router.c socketif.c switch.c tracker.c utils.c zone.c) +ADD_LIBRARY(agl-audio-plugin MODULE module.c audiomgr.c classify.c config.c discover.c loopback.c node.c router.c socketif.c switch.c tracker.c utils.c zone.c pulseaudio-agl.cfg) INCLUDE_DIRECTORIES(${include_dirs}) TARGET_LINK_LIBRARIES(agl-audio-plugin ${link_libraries}) SET_TARGET_PROPERTIES(agl-audio-plugin PROPERTIES PREFIX "" @@ -46,3 +47,5 @@ SET_TARGET_PROPERTIES(agl-audio-plugin PROPERTIES PREFIX "" INSTALL(TARGETS agl-audio-plugin LIBRARY DESTINATION ${plugin_install_dir}) +INSTALL(FILES pulseaudio-agl.cfg + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pulse)