Re: [AD] SF.net SVN: alleg: [10133] allegro/branches/4.9

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, Apr 6, 2008 at 12:14 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> Modified: allegro/branches/4.9/addons/acodec/CMakeLists.txt
> ===================================================================
> --- allegro/branches/4.9/addons/acodec/CMakeLists.txt 2008-04-06 06:30:16 UTC (rev 10132)
> +++ allegro/branches/4.9/addons/acodec/CMakeLists.txt 2008-04-06 06:43:00 UTC (rev 10133)
> @@ -1,4 +1,25 @@
> -set(ACODEC_SOURCES acodec.c flac.c ex.c ogg.c wav.c)
> +option(WANT_FLAC    "Enable FLAC support (acodec)" on)
> +option(WANT_OGG     "Enable ogg-vorbis support (acodec)" on)
> +option(WANT_SNDFILE "Enable wav/aiff support (acodec)" on)
> +
> +set(ACODEC_SOURCES acodec.c ex.c)
> +set(DFLAGS "")
> +
> +if(WANT_FLAC)
> +    set(ACODEC_SOURCES ${ACODEC_SOURCES} flac.c)
> +    set(DFLAGS "${DFLAGS} -DWANT_FLAC")
> +endif(WANT_FLAC)
> +
> +if(WANT_OGG)
> +    set(ACODEC_SOURCES ${ACODEC_SOURCES} ogg.c)
> +    set(DFLAGS "${DFLAGS} -DWANT_OGG")
> +endif(WANT_OGG)
> +
> +if(WANT_SNDFILE)
> +    set(ACODEC_SOURCES ${ACODEC_SOURCES} wav.c)
> +    set(DFLAGS "${DFLAGS} -DWANT_SNDFILE")
> +endif(WANT_SNDFILE)
> +
>  set(ACODEC_INCLUDE_FILES allegro5/acodec.h)

Hi,

The WANT_* variables are for internal use in the CMake build system.  Don't
export them or refer to them in the C files.  In this case you should have
cmake generate a .h file (e.g. in the same way as alplatf.h) and include that,
with variables named ACODEC_CFG_OGG, etc. or maybe ALLEGRO_ACODEC_CFG_...

Peter


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers

Thanks for pointing out a better way to do it. I've checked in the changes.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/