Hi,
I have a project which I build using SCons (and MinGW/gcc depending on the platform). This project depends on several other libraries (lets call them libfoo
and libbar
) which can be installed on different places for different users.
Currently, my SConstruct
file embeds hard-coded path to those libraries (say, something like: C:\libfoo
).
Now, I'd like to add a configuration option to my SConstruct
file so that a user who installed libfoo
at another location (say C:\custom_path\libfoo
) can do something like:
> scons --configure --libfoo-prefix=C:\custom_path\libfoo
Or:
> scons --configure
scons: Reading SConscript files ...
scons: done reading SConscript files.
### Environment configuration ###
Please enter location of 'libfoo' ("C:\libfoo"): C:\custom_path\libfoo
Please enter location of 'libbar' ("C:\libfoo"): C:\custom_path\libbar
### Configuration over ###
Once chosen, those configuration options should be written to some file and reread automatically every time scons
runs.
Does scons
provide such a mechanism ? How would I achieve this behavior ? I don't exactly master Python so even obvious (but complete) solutions are welcome.
Thanks.