[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegames
From:       Ian Wadham <iandw.au () gmail ! com>
Date:       2011-05-18 2:14:36
Message-ID: 20110518021436.2CDA9AC76D () svn ! kde ! org
[Download RAW message or body]

SVN commit 1232491 by ianw:

Make the dependency of Granatier and KGoldrunner on OpenAL and SndFile optional. The \
dependency should really be REQUIRED, but that kills the whole KDE Games build if \
OpenAL or SndFile is not present. If OpenAL is absent, Granatier will not be built \
and KGoldrunner will be built but with sound completely disabled.

 M  +5 -0      CMakeLists.txt  
 M  +3 -7      kgoldrunner/CMakeLists.txt  
 M  +0 -2      kgoldrunner/src/kgrglobals.h  


--- trunk/KDE/kdegames/CMakeLists.txt #1232490:1232491
@@ -24,6 +24,9 @@
 macro_optional_find_package(PythonInterp)
 macro_log_feature(PYTHONINTERP_FOUND "Python" "Programming language that lets you \
work more quickly and integrate your systems more effectively." "http://python.org" \
FALSE "" "Kajongg will not be built without the python interpreter (version 2.6 < \
3.0).")  
+macro_optional_find_package(OpenAL)
+macro_log_feature(OPENAL_FOUND "OpenAL" "OpenAL (Open Audio Library) is a free \
software cross-platform audio API." "http://connect.creativelabs.com/openal" FALSE "" \
"KGoldrunner and Granatier need OpenAL for sound output. If OpenAL cannot be provided \
on some platform or distribution, please email the KDE Games list <kde-games-devel at \
kde dot org>.") +
 if(OPENGL_FOUND AND QT_QTOPENGL_FOUND)
     set(OPENGL_SUPPORT true)
 endif(OPENGL_FOUND AND QT_QTOPENGL_FOUND)
@@ -51,7 +54,9 @@
 
 macro_optional_add_subdirectory(bomber)
 macro_optional_add_subdirectory(bovo)
+if(OPENAL_FOUND)
 macro_optional_add_subdirectory(granatier)
+endif(OPENAL_FOUND)
 macro_optional_add_subdirectory(lskat)
 macro_optional_add_subdirectory(kapman)
 macro_optional_add_subdirectory(katomic)
--- trunk/KDE/kdegames/kgoldrunner/CMakeLists.txt #1232490:1232491
@@ -1,13 +1,8 @@
 project(kgoldrunner)
 
-# macro_optional_find_package(OpenAL QUIET)
-find_package(OpenAL REQUIRED)
-macro_log_feature(OPENAL_FOUND "OpenAL" "OpenAL (Open Audio Library) is a free \
software cross-platform audio API." "http://connect.creativelabs.com/openal" FALSE "" \
"KGoldrunner needs OpenAL for sound output. If OpenAL cannot be provided on some \
platform or distribution, please email the author of KGoldrunner <iandw dot au at \
                gmail dot com>.")
-
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
-# macro_optional_find_package(SndFile )
-find_package(SndFile REQUIRED)
-macro_log_feature(SNDFILE_FOUND "SndFile" "SndFile (libsndfile) is a C library \
written by Erik de Castro Lopo for reading and writing audio files." \
"http://www.mega-nerd.com/libsndfile/" FALSE "" "KGoldrunner needs SndFile to decode \
sound files. If SndFile cannot be provided on some platform or distribution, please \
email the author of KGoldrunner <iandw dot au at gmail dot com>.") \
+macro_optional_find_package(SndFile) +macro_log_feature(SNDFILE_FOUND "SndFile" \
"SndFile (libsndfile) is a C library written by Erik de Castro Lopo for reading and \
writing audio files." "http://www.mega-nerd.com/libsndfile/" FALSE "" "KGoldrunner \
needs SndFile to decode sound files. If SndFile cannot be provided on some platform \
or distribution, please email the KDE Games list <kde-games-devel at kde dot org>.")  \
  # KGoldrunner sound requires access to the OpenAL and SndFile libraries.  The
 # use of Phonon, as an alternative, does not give good results and is deprecated
@@ -17,6 +12,7 @@
     include_directories(src/TagaroAudio)
     set(KGOLDRUNNER_OPENAL TRUE)
     ADD_DEFINITIONS(-DKGOLDRUNNER_USE_OPENAL)
+    ADD_DEFINITIONS(-DENABLE_SOUND_SUPPORT)
 endif(OPENAL_FOUND AND SNDFILE_FOUND)
 
 add_subdirectory( src ) 
--- trunk/KDE/kdegames/kgoldrunner/src/kgrglobals.h #1232490:1232491
@@ -23,8 +23,6 @@
 #include <QByteArray>
 #include <QString>
 
-#define ENABLE_SOUND_SUPPORT
-
 enum Owner {SYSTEM, USER};
 
 const char FREE      = ' ';


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic