Collecting external dependencies  
Author Message
troff





PostPosted: Visual C++ General, Collecting external dependencies Top

Hi everyone

I have a couple of projects that I move around different computers and that others also need to work with from time to time. It depends on a few external pieces of software, e.g. python.

What I would like is a simple way of packaging up the locations of these software packages, so that I can use $(PYTHON_HOME)\include, $(PYTHON_HOME)\Libs and the occasional $(PYTHON_SRC)\PCBuild8 and have them all change magically.

I don't want to define environment variables and since these are not the only projects I nor my colleagues work on I don't want to add these paths into the global IDE settings. Ideally I'd like a file simply defining these variables, but I just can't find a way to do so.

I thought I had a workaround using bat files but it turned out I didn't. It would still have been ugly though. Is there a proper way to handle my scenario



Visual C++9  
 
 
Marian Luparu





PostPosted: Visual C++ General, Collecting external dependencies Top

Hi,

No need for a workaround. You can achieve all this using property sheets.

Create a new property sheet (go to Property Manager window / Add New Project Property Sheet). Open up the Property Pages by double clicking the property sheet. Here, create a new macro (User Macros / Add Macro). Name if PYTHON_HOME and set it to your current path.

You can now include this property sheet in all your project and configurations. You can reference $(PYTHON_HOME) in all your settings and it will expand to the path you specified.

When moving your project to a different machine, the only location you need to change if the path changed is the property sheet file.

Hope this helps,
Marian Luparu
Visual C++ IDE


 
 
troff





PostPosted: Visual C++ General, Collecting external dependencies Top

Ah, that's brilliant! I was expecting property sheets to contain subsets of project configurations, but this is exactly what I need.

Thanks, good work!