[phonon] /: Add option to build Phonon without experimental library

Harald Sitter sitter at kde.org
Tue Aug 2 13:50:35 UTC 2011


Git commit e66be3f01da496c637798e44696ff0d5a4506c90 by Harald Sitter.
Committed on 02/08/2011 at 15:18.
Pushed by sitter into branch 'master'.

Add option to build Phonon without experimental library

CCMAIL: kde-buildsystem at kde.org

M  +2    -1    CMakeLists.txt
M  +3    -2    phonon/CMakeLists.txt
M  +5    -3    PhononConfig.cmake.in
M  +12   -10   includes/CMakeLists.txt

http://commits.kde.org/phonon/e66be3f01da496c637798e44696ff0d5a4506c90

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8fe22d1..aa29d0c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
 # CMP0002: we have multiple targets with the same name for the unit tests
 cmake_policy(SET CMP0002 OLD)
 
+option(PHONON_BUILD_EXPERIMENTAL "Build the experimental library" ON)
 option(PHONON_BUILD_DEMOS "Build the demos" OFF)
 option(PHONON_BUILD_DESCRIPTOR "Builds and installs a library descriptor to be used for ABI checks" OFF)
 option(PHONON_BUILD_DESIGNER_PLUGIN "Build the Qt Designer plugin" ON)
@@ -137,7 +138,7 @@ if(NOT WIN32) # pkgconfig file
     make_abs_install_path(ABS_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}")
     make_abs_install_path(ABS_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR}")
     make_abs_install_path(ABS_BUILDSYSTEM_INSTALL_DIR "${BUILDSYSTEM_INSTALL_DIR}")
-  
+
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/phonon.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc @ONLY)
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 endif(NOT WIN32)
diff --git a/PhononConfig.cmake.in b/PhononConfig.cmake.in
index 906cb4b..4e46016 100644
--- a/PhononConfig.cmake.in
+++ b/PhononConfig.cmake.in
@@ -7,7 +7,7 @@ get_filename_component(currentDir ${CMAKE_CURRENT_LIST_FILE} PATH) # get the dir
 get_filename_component(rootDir ${currentDir}/@relInstallDir@ ABSOLUTE) # get the chosen install prefix
 
 set(PHONON_PULSESUPPORT @PHONON_PULSESUPPORT@)
-set(PHONON_FOUND_EXPERIMENTAL TRUE) # this is currently always built
+set(PHONON_FOUND_EXPERIMENTAL @PHONON_BUILD_EXPERIMENTAL@)
 
 # install locations
 set(PHONON_INCLUDE_DIR "${rootDir}/@INCLUDE_INSTALL_DIR@")
@@ -18,10 +18,12 @@ set(PHONON_BUILDSYSTEM_DIR "${rootDir}/@BUILDSYSTEM_INSTALL_DIR@")
 include(${currentDir}/PhononTargets.cmake )
 
 set(PHONON_LIBRARY Phonon::phonon)
-set(PHONON_EXPERIMENTAL_LIBRARY Phonon::phononexperimental)
+if(PHONON_FOUND_EXPERIMENTAL)
+    set(PHONON_EXPERIMENTAL_LIBRARY Phonon::phononexperimental)
+endif(PHONON_FOUND_EXPERIMENTAL)
 set(PHONON_LIBRARIES ${PHONON_LIBRARY} ${PHONON_EXPERIMENTAL_LIBRARY})
 # The following one is only for compatiblity
-set(PHONON_LIBS ${PHONON_LIBRARIES} )
+set(PHONON_LIBS ${PHONON_LIBRARIES})
 
 set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR} ${PHONON_INCLUDE_DIR}/KDE )
 
diff --git a/includes/CMakeLists.txt b/includes/CMakeLists.txt
index 3e4b1e3..7f88f08 100644
--- a/includes/CMakeLists.txt
+++ b/includes/CMakeLists.txt
@@ -93,13 +93,15 @@ install( FILES
   old/Phonon/VolumeSlider
 DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon COMPONENT Devel)
 
-install(FILES
-  old/Phonon/Experimental/AbstractVideoDataOutput
-  old/Phonon/Experimental/AudioDataOutput
-  old/Phonon/Experimental/SnapshotInterface
-  old/Phonon/Experimental/VideoDataOutput
-  old/Phonon/Experimental/VideoDataOutputInterface
-  old/Phonon/Experimental/VideoFrame
-  old/Phonon/Experimental/VideoFrame2
-  old/Phonon/Experimental/Visualization
-DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon/Experimental COMPONENT Devel)
+if (PHONON_BUILD_EXPERIMENTAL)
+    install(FILES
+        old/Phonon/Experimental/AbstractVideoDataOutput
+        old/Phonon/Experimental/AudioDataOutput
+        old/Phonon/Experimental/SnapshotInterface
+        old/Phonon/Experimental/VideoDataOutput
+        old/Phonon/Experimental/VideoDataOutputInterface
+        old/Phonon/Experimental/VideoFrame
+        old/Phonon/Experimental/VideoFrame2
+        old/Phonon/Experimental/Visualization
+    DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon/Experimental COMPONENT Devel)
+endif (PHONON_BUILD_EXPERIMENTAL)
diff --git a/phonon/CMakeLists.txt b/phonon/CMakeLists.txt
index 0f32523..f13d76f 100644
--- a/phonon/CMakeLists.txt
+++ b/phonon/CMakeLists.txt
@@ -1,4 +1,6 @@
-add_subdirectory(experimental)
+if (PHONON_BUILD_EXPERIMENTAL)
+    add_subdirectory(experimental)
+endif (PHONON_BUILD_EXPERIMENTAL)
 
 set(PULSEAUDIO_FIND_VERSION "0.9.15")
 macro_optional_find_package(PulseAudio)
@@ -6,7 +8,6 @@ macro_log_feature(PULSEAUDIO_FOUND "PulseAudio" "A cross-platform, networked sou
 macro_optional_find_package(GLIB2)
 macro_log_feature(GLIB2_FOUND "GLib2" "GLib 2 is required to compile the pulseaudio for Phonon" "http://www.gtk.org/download/" FALSE)
 
-
 if (GLIB2_FOUND AND PULSEAUDIO_FOUND)
    set(PHONON_PULSESUPPORT TRUE CACHE BOOL "Has Phonon pulseaudio support ?" FORCE) # this one must be forced into the cache so it exists also in the toplevel CMakeLists.txt
    add_definitions(-DHAVE_PULSEAUDIO)


More information about the Kde-buildsystem mailing list