Visual Studio property page

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Visual Studio property page

Post by Transporter »

I have a small patch for all user of Visual Studio. This patch creates a Visual Studio property page in SDK folder.

It's very easy to use property pages:
  1. Open the Property Manager (View > Property Manager)
  2. Right click on your project
  3. Add Existing Property Sheet...
  4. Select the property file in your SDK
All paths for include and library are set correct now. You just need to add the specific lib (OgreMain.lib) without an absolute path.

The method has a few advantages:
  1. You don't need admin rights to set environment variables
  2. You can work with multiple SDKs/versions, just change the property page
  3. You can use variables in postbuild process to copy ogre binaries to your solution folder (copy $(OGRE_BIN)/$(Configuration)/*.dll $(TargetDir) /y)
https://sourceforge.net/tracker/?func=d ... tid=302997
You do not have the required permissions to view the files attached to this post.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4308
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 137

Re: Visual Studio property page

Post by spacegaier »

Just FYI: Was merged today: https://bitbucket.org/sinbad/ogre/commi ... 40d7bee654

Thanks for the patch!
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
altren
Gnome
Posts: 334
Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 26

Re: Visual Studio property page

Post by altren »

You can add different .lib for different configurations in propertysheet as well:

Code: Select all

  <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
    <Link>
      <AdditionalDependencies>OgreMain_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
    <Link>
      <AdditionalDependencies>OgreMain.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
Image