summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Amelian <serghei.amelian@gmail.com>2012-02-12 21:44:42 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-06-03 18:07:32 +0200
commitff69ef11db77ae8b88a1e92bc019befb90dd979a (patch)
treec816cad7a876d78f2f85988844c6bb6ee00dfe03
parent3bb19c4cc14134d669bf83ed399e739bbd3cf113 (diff)
downloadtdemultimedia-ff69ef11db77ae8b88a1e92bc019befb90dd979a.tar.gz
tdemultimedia-ff69ef11db77ae8b88a1e92bc019befb90dd979a.zip
cmake port for kmix
(cherry picked from commit 7eef82aa49ab12a98683dc7ac40e9bff9a4ffead)
-rw-r--r--CMakeLists.txt82
-rw-r--r--ConfigureChecks.cmake22
-rw-r--r--config.h.cmake1
-rw-r--r--kmix/CMakeLists.txt75
-rw-r--r--kmix/pics/CMakeLists.txt23
5 files changed, 203 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..0a315086
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,82 @@
+#################################################
+#
+# (C) 2012 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+##### general package setup #####################
+
+project( tdemultimedia )
+
+set( PACKAGE tdemultimedia )
+set( VERSION "R14" )
+
+
+##### include essential cmake modules ###########
+
+include( FindPkgConfig )
+include( CheckIncludeFile )
+include( CheckTypeSize )
+include( CheckCSourceCompiles )
+include( CheckCXXSourceCompiles )
+include( CheckLibraryExists )
+
+
+##### include our cmake modules #################
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+include( TDEMacros )
+
+
+##### setup install paths #######################
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### optional stuff ############################
+
+option( WITH_ALSA "Enable ALSA support" ON )
+
+
+##### user requested modules ####################
+
+option( BUILD_ALL "Build all" OFF )
+option( BUILD_KMIX "Build kmix" ${BUILD_ALL} )
+
+
+##### configure checks ##########################
+
+include( ConfigureChecks.cmake )
+
+
+###### global compiler settings #################
+
+add_definitions(
+ -DHAVE_CONFIG_H
+)
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
+
+
+##### activate dependencies #####################
+
+
+##### kdemultimedia directories ########################
+
+tde_conditional_add_subdirectory( BUILD_KMIX kmix )
+
+
+##### write configure files #####################
+
+configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 00000000..00a246ce
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2012 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+#################################################
+
+# ALSA
+if( WITH_ALSA )
+ find_package( ALSA )
+ if( NOT ALSA_FOUND )
+ tde_message_fatal( "ALSA support is requested, but was not found on your system" )
+ endif( NOT ALSA_FOUND )
+ set( HAVE_LIBASOUND2 1 )
+endif( WITH_ALSA )
+
+
+# required stuff
+find_package( TQt )
+find_package( TDE )
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 00000000..14223255
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1 @@
+#cmakedefine HAVE_LIBASOUND2 1
diff --git a/kmix/CMakeLists.txt b/kmix/CMakeLists.txt
new file mode 100644
index 00000000..a8a419f7
--- /dev/null
+++ b/kmix/CMakeLists.txt
@@ -0,0 +1,75 @@
+#################################################
+#
+# (C) 2012 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( pics )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${TDE_INCLUDE_DIR}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kmix.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+install( FILES kmixui.rc DESTINATION ${DATA_INSTALL_DIR}/kmix )
+install( FILES restore_kmix_volumes.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} )
+install( FILES kmixapplet.desktop DESTINATION ${DATA_INSTALL_DIR}/kicker/applets )
+install( FILES kmixctrl_restore.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+
+
+##### kmix_panelapplet (module) #################
+
+tde_add_kpart( kmix_panelapplet AUTOMOC
+ SOURCES
+ kmixapplet.cpp viewbase.cpp viewapplet.cpp mixdevicewidget.cpp
+ mdwslider.cpp mixer.cpp mixset.cpp mixdevice.cpp
+ mixer_backend.cpp ksmallslider.cpp volume.cpp kledbutton.cpp
+ verticaltext.cpp mixerIface.skel colorwidget.ui
+ dialogviewconfiguration.cpp kmixtoolbox.cpp mixertoolbox.cpp
+ dialogselectmaster.cpp
+ LINK tdeui-shared ${ALSA_LIBRARIES}
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### kmix (kdeinit) ############################
+
+tde_add_tdeinit_executable( kmix AUTOMOC
+ SOURCES
+ main.cpp kmix.cpp kmixdockwidget.cpp kmixprefdlg.cpp
+ viewbase.cpp viewoutput.cpp viewinput.cpp viewswitches.cpp
+ viewsurround.cpp viewdockareapopup.cpp viewsliders.cpp
+ viewgrid.cpp mixdevicewidget.cpp mdwslider.cpp
+ mdwswitch.cpp mdwenum.cpp kmixerwidget.cpp mixer.cpp
+ mixset.cpp mixdevice.cpp mixer_backend.cpp ksmallslider.cpp
+ volume.cpp kledbutton.cpp verticaltext.cpp mixerIface.skel
+ kmixtoolbox.cpp mixertoolbox.cpp dialogviewconfiguration.cpp
+ KMixApp.cpp dialogselectmaster.cpp
+ LINK tdeui-shared ${ALSA_LIBRARIES}
+)
+
+
+##### kmixctrl (kdeinit) ########################
+
+tde_add_tdeinit_executable( kmixctrl AUTOMOC
+ SOURCES
+ kmixctrl.cpp mixer.cpp mixset.cpp mixdevice.cpp
+ volume.cpp mixerIface.skel mixertoolbox.cpp
+ mixer_backend.cpp
+ LINK tdecore-shared ${ALSA_LIBRARIES}
+)
diff --git a/kmix/pics/CMakeLists.txt b/kmix/pics/CMakeLists.txt
new file mode 100644
index 00000000..35ea82c5
--- /dev/null
+++ b/kmix/pics/CMakeLists.txt
@@ -0,0 +1,23 @@
+#################################################
+#
+# (C) 2012 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+tde_install_icons( kmix )
+
+install( FILES
+ mix_audio.png mix_bass.png mix_cd.png mix_ext.png
+ mix_microphone.png mix_midi.png mix_recmon.png
+ mix_treble.png mix_unknown.png mix_volume.png
+ mix_surround.png mix_video.png mix_headphone.png
+ mix_digital.png mix_ac97.png kmixdocked.png
+ kmixdocked_mute.png kmixdocked_error.png mix_record.png
+ SpeakerFrontLeft.png SpeakerRearLeft.png SpeakerFrontRight.png
+ SpeakerRearRight.png Listener.png
+ DESTINATION ${DATA_INSTALL_DIR}/kmix/pics )