CC'ing kde-buildsystem to this thread.

Ian Wadham <[email protected]> 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
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to