Reputation: 137
Having to manually editing the settings for every new project I create is quite tedious. And it is quite error prone so I sometimes forget to add something and a compile error happens.
Is it possible to set up Visual Studio so that the settings I need for OpenCV are automatically applied to every new project?
By the way, I'm using Visual Studio 2010.
Upvotes: 4
Views: 1975
Reputation: 17295
Your should consider using CMake (as OpenCV itself does) for generating your project and solution files. It will allow you to (re-)generate your solution files on any machine in a consistent manner for multiple versions of IDEs and OpenCV updates.
All you need is a single CMakeLists.txt
file along with your source code.
Upvotes: 1
Reputation: 11941
Certainly under VS2012 you can set properties in microsoft.cpp.win32.user and they become global. And according to this (and my vague memory) it works for VS2010 too: http://www.curlybrace.com/words/2012/12/17/setting-global-c-include-paths-in-visual-studio-2012-and-2011-and-2010/
However, what I do is have a property sheet with all the OpenCV settings in it and when I create a new project I add the property sheet. (actually I have two, one for debug and one for release, although if I used conditional properties I would only need one.). If I change versions of OpenCV I edit that property sheet and all my projects get the new settings.
Also see http://blogs.msdn.com/b/vsproject/archive/2009/06/23/inherited-properties-and-property-sheets.aspx
Upvotes: 6
Reputation: 1256
You can import/export your project settings.
In Visual Studio(2010), goto Tools -> Import and Export Settings..
There you can, backup/save/export your current project settings. Now every time you create new project, import this setting and you won't need to repeat complete procedure.
Upvotes: 0