Slaus
Slaus

Reputation: 2236

Installation independent visual-C++ project properties

Is there a way to adjust visual-C++ (MS VS 2010 EE) project properties in such a way, that the same .sln files can be built just in one click among different computers (on Windows, of course)? - so it will be possibly to upload visual-C++ projects to SVN server. Project uses some libraries (header and .lib files) with absolute (system dependent) path (e.g. boost) and it's own utils.

Upvotes: 0

Views: 157

Answers (3)

n1ckp
n1ckp

Reputation: 1521

Visual studio has some identifier like $(ProjectDir) that you can use in the project settings.

For example you could put a path like "$(ProjectDir)....\headers\boost\" in your include search path and it would work for multiple location of $(ProjectDir).

Other like $(ProjectName), $(ConfigurationName), $(IntDir) (Intermediate directory) can also be usefull.

I don't have a reference link for the moment.

Upvotes: 0

Ferruccio
Ferruccio

Reputation: 100718

You can use environment variables in your project settings by enclosing them in $(). e.g. if your environment defines BOOST_INCLUDE:

set BOOST_INCLUDE=C:\boost\include\boost-1_45

then you can use $(BOOST_INCLUDE) in your settings to refer to the Boost include directory.

Upvotes: 2

user180326
user180326

Reputation:

Visual studio allows you to configure search directories for include files and libraries per system. You must agree with your colleages which folders should be made part of this scheme. Alternatively, you could use a set of predetermined environment variables and use paths relative to those.

Upvotes: 1

Related Questions