From kde-buildsystem Wed May 18 02:40:44 2011 From: Raphael Kubo da Costa Date: Wed, 18 May 2011 02:40:44 +0000 To: kde-buildsystem Subject: Re: KDE/kdegames Message-Id: <87vcx8pw7n.fsf () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-buildsystem&m=130568651001795 CC'ing kde-buildsystem to this thread. Ian Wadham writes: > 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 Hi, Ian, I saw the commit message by chance in #kde-commits and decided to take a look. From what I understood, you want both libsndfile and OpenAL to be hard (ie. required) dependencies for Granatier and KGoldRunner, but only if they are built (ie. if one passes -DBUILD_granatier=OFF and -DBUILD_kgoldrunner=OFF), kdegames should build just fine without libsndfile and OpenAL installed in the system. In this case, wouldn't it be enough to call find_package(SndFile) and find_package(OpenAL) and then add the respective macro_log_feature() calls with the `REQUIRED' parameter set to TRUE instead of FALSE? By putting these commands inside granatier/CMakeLists.txt and kgoldrunner/CMakeLists.txt, you avoid calling them when granatier and kgoldrunner are not build, while still failing to build when they are not found. _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem