diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 61 |
1 files changed, 51 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c11ec51..280e89a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,8 +5,20 @@ set(HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.h") set(SYMBOLS_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.def") +set(VAPI_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.vapi") + +vapi_gen(accounts-service + LIBRARY + accounts-service + PACKAGES + gio-2.0 + INPUT + /usr/share/gir-1.0/AccountsService-1.0.gir +) vala_init(indicator-sound-service + DEPENDS + accounts-service PACKAGES config gio-2.0 @@ -15,12 +27,12 @@ vala_init(indicator-sound-service libpulse libpulse-mainloop-glib libnotify + accounts-service OPTIONS --ccode --thread --vapidir=${CMAKE_SOURCE_DIR}/vapi/ --vapidir=. - --target-glib=2.36 --pkg=url-dispatcher --pkg=bus-watcher ) @@ -33,24 +45,25 @@ vala_add(indicator-sound-service media-player media-player-list mpris2-interfaces -) -vala_add(indicator-sound-service - main.vala - DEPENDS - service + accounts-service-user ) vala_add(indicator-sound-service volume-control.vala ) vala_add(indicator-sound-service media-player.vala +) +vala_add(indicator-sound-service + media-player-mpris.vala DEPENDS + media-player mpris2-interfaces ) vala_add(indicator-sound-service media-player-list.vala DEPENDS media-player + media-player-mpris mpris2-interfaces ) vala_add(indicator-sound-service @@ -65,6 +78,16 @@ vala_add(indicator-sound-service media-player mpris2-interfaces ) +vala_add(indicator-sound-service + accounts-service-user.vala + DEPENDS + media-player + mpris2-interfaces + accounts-service-sound-settings +) +vala_add(indicator-sound-service + accounts-service-sound-settings.vala +) vala_finish(indicator-sound-service SOURCES @@ -75,6 +98,8 @@ vala_finish(indicator-sound-service ${HEADER_PATH} GENERATE_SYMBOLS ${SYMBOLS_PATH} + GENERATE_VAPI + ${VAPI_PATH} ) set_source_files_properties( @@ -92,16 +117,33 @@ set( ) ########################### -# Executable +# Lib ########################### add_definitions( -w ) +add_library( + indicator-sound-service-lib STATIC + ${INDICATOR_SOUND_SOURCES} +) + +target_link_libraries( + indicator-sound-service-lib + ${PULSEAUDIO_LIBRARIES} + ${SOUNDSERVICE_LIBRARIES} +) + +########################### +# Executable +########################### + +include_directories(${CMAKE_BINARY_DIR}) + add_executable( indicator-sound-service-bin - ${INDICATOR_SOUND_SOURCES} + main.c ) set_target_properties( @@ -112,8 +154,7 @@ set_target_properties( target_link_libraries( indicator-sound-service-bin - ${PULSEAUDIO_LIBRARIES} - ${SOUNDSERVICE_LIBRARIES} + indicator-sound-service-lib ) ########################### |