diff options
author | Manuel Bachmann <manuel.bachmann@iot.bzh> | 2016-07-08 16:31:01 +0200 |
---|---|---|
committer | Yannick Gicquel <yannick.gicquel@iot.bzh> | 2016-10-11 17:09:07 +0200 |
commit | 2de141b9a3145a4a8edf2e310adfa8d425637e53 (patch) | |
tree | 9ecf1291300fdc2a1a2915e3ce18a6b5c6a15181 /CMakeLists.txt | |
parent | cc70e0ae30920ca835bf011f8040afb6fea43f45 (diff) |
Implement JSON configuration file
A JSON configuration file can now be read as "/etc/
pulseaudio-agl.cfg", and a sample one is provided by the
package. If it exists and is valid, it will override the
default configuration.
As a result, the module now depends on json-c.
Change-Id: I3f5deccc6f9b89cbd54bea7004271b8aec727538
Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f1ce33..f03a65d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,18 +27,18 @@ 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) ############################################################ -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) +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 +46,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) |