From 66edc177867c09e696552a73862c29485194e704 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 11 Feb 2014 20:52:49 -0600 Subject: Switch the build to have a library of all the vala components --- src/CMakeLists.txt | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3ee6a65..ca1eb82 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,11 +46,6 @@ vala_add(indicator-sound-service mpris2-interfaces accounts-service-user ) -vala_add(indicator-sound-service - main.vala - DEPENDS - service -) vala_add(indicator-sound-service volume-control.vala ) @@ -110,16 +105,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( @@ -130,8 +142,7 @@ set_target_properties( target_link_libraries( indicator-sound-service-bin - ${PULSEAUDIO_LIBRARIES} - ${SOUNDSERVICE_LIBRARIES} + indicator-sound-service-lib ) ########################### -- cgit v1.2.3