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

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


> 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





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