Add include directory to scons

Go To StackoverFlow.com

3

I have a project which has been checked out of Subversion and uses Scons for building. However, I have a library installed on my computer which Scons doesn't detect - it just says that the include file can't be found. Is there any way that I can direct Scons to the library location without altering the Sconscript file at all (because I don't want to have to deal with conflicts every time I update) - e.g. add a command line option that it will detect before searching for the include file? I can't even see all the available options because it doesn't respond to the --help option before it searches for the include files.

2009-06-16 13:14
by a_m0d


3

Okay, after some more googling, I found that there is a way to do it. gcc has a number of default directories that it searches (which I already knew - I just didn't know what they were defined as). The simplest way to do what I was after is to add the directories to these environment variables. The one that I needed was

$CPATH

This sets the path where gcc searches for its include files. Setting this to the directory I needed solved my problem.

2009-06-17 00:29
by a_m0d


2

you can set env["CPPPATH"], but I hope there's an easier way...

2010-08-11 13:24
by sigs


0

SCons has a concept of repositories - directories to look for source and target files. These can be specified on command line.

-Y REPOSITORY, --repository=REPOSITORY, --srcdir=REPOSITORY
                            Search REPOSITORY for source and target files.

To get to help of SCons itself, use -H option.

2014-05-20 10:48
by anatoly techtonik


-1

no you can't, unless the developer of the scons script explicitly adds support for it.

2009-06-16 13:17
by David Cournapeau
Ads