[Scons-dev] Local convention for C libraries dependencies

anatoly techtonik techtonik at gmail.com
Fri Jun 12 07:52:57 EDT 2015


Hi,

Are there any conventions how to normalize layout
directory layout of external C libraries, so that a build
system, such as SCons can easily add them?

I don't use C, so I want to make adding external C
library dependency to SCons build as easy as enabling
 "import something" to work for Python script.

I see it as following:
site_scons/
+ site_c_packages/
   + SDL/
     + lib/
     + include/
     + src/
   + zlib/
     + lib/
     + include/
     + src/

So, just normalized directory structure, so that
SCons can lookup the library there to add its
dirs to the build sequence if needed.


Where I would use this? I created a build script for
Wesnoth that bootstraps dependencies required for
it to be built with MinGW + SCons on Windows.

https://bitbucket.org/techtonik/locally/src/48cd31a64c9ec8b198e2b4c9d394d43c45d65bcd/05.wesnoth.py?at=default

As you see, it downloads a lot of tar.gz, unpacks
them and tries to add some path into some SCons
variables. All of this is pretty mystic, and must say
that I still have no idea what I was doing. I was just
trying different combinations and hints until the
build finally worked.

The directory layout convention along with
README explaining what is lib/ include/ src/ and
what is expected to be found there, will greatly help
me to explain other people how to maintain this
script and normalize new libs after unpacking.


Is that a good concept or it is flawed by design?

-- 
anatoly t.


More information about the Scons-dev mailing list