DSSS on lib wiht import inside version

Bill Baxter dnewsgroup at billbaxter.com
Sun Aug 12 22:18:56 PDT 2007


Bill Baxter wrote:
> Hi,
> I'm trying to make a dsss.conf for schooner.
> Schooner can be built in two different flavors, one flavor using 
> derelict for openGL, and another flavor using a built-in static 
> translation of the OpenGL headers.  To that end some of the Schooner 
> libraries use the following:
> ---------------
> module gld;
> 
> version (useDerelict) {
>   public import derelict.opengl.gl;
> } else {
>   public import gl;
> }
> ...
> ---------------
> 
> When dsss tries to compile this library is fails to find gl.d.  I think 
> perhaps the version statements are confusing it.
> 
> I suspect I could work around it if there were a way to explicitly force 
> a depencdency in the dsss.conf, but I don't see such a thing.
> 
> Here's my current take at a dsss.conf for schooner:
> 
> -----
> name = schooner
> 
> version(Posix) {
> [x11]
> buildflags+=-Ix11/source
> exclude=x11/buildme.d
> } else {
> [win32]
> buildflags+=-Iwin32/source
> exclude=win32/buildme.d win32/source/win32/all.d
> }
> 
> [freetype]
> buildflags+=-Ifreetype/source
> exclude=freetype/buildme.d freetype/build_freetype.d
> 
> [gl]
> buildflags+=-Igl/source
> exclude=gl/buildme.d
> 
> [gld]
> buildflags+=-Igld/source
> exclude=gld/buildme.d
> 
> [fonts]
> buildflags+=-Ifonts/source
> exclude=fonts/buildme.d
> 
> [*]
> version(useDerelict) {
>   buildflags+=-version=useDerelict
> }
> -----


Here's the actual error I get when trying to build gld:

   gld\source\gld.d(6): module gl cannot read file 'gl.d'


Actually it seems like the problem is that gl.d is originally located in 
gl/source/gl.d, but it wants to be installed as include/d/gl.d (for use 
as "import gl;").

All the schooner modules do that sort of thing.  All of the lib source 
is located in a 'source' subdir, but the files need to be installed 
*without* the subdirectory prefix.

--bb


More information about the Digitalmars-d-learn mailing list