Skip to main content
GameDev.net gamedev.net
🔒 Locked

MSVC2010 preprocessor definition for current configuration

Started by Giallanon Nov 9, 2012 at 1:13 PM 1 replies 1.2k views
Original Post
Giallanon
Giallanon
I've a solution with many projects and I need to declare some preprocessor definition like GOS_OS_WINDOWS and GOS_RENDERER_DX9 in order to select which OS to use and which renderer to use.

Since now, my solution has been to create different configurations and then edit every single project adding the right preprocessor defines.

So, for example, I've the configuration [DEBUG Win32 DX9] and every project that is included in this configuration have the GOS_OS_WINDOWS and GOS_RENDERER_DX9 defined by clicking on proprietis | c++ preprocessor and so on.

Then I've the [DEBUG Win32 DX11] configuration, which in turn need to define GOS_OS_WINDOWS and GOS_RENDERER_DX11.
I guess you've got the idea.

Is there a way to tell MSVC that I want GOS_OS_WINDOWS and GOS_RENDERER_DX9 defined for all projects that stay in a [DEBUG Win32 DX9] configuration without editing every single projects?
mrbastard
mrbastard
You can almost certainly do this with Project Property Sheets

Where I work IIRC there's a hierarchy of increasingly specific .vsprops files.
[size="1"]
Giallanon
Giallanon
Thank you, it seems promising. I'll look into it

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.