[CMake] How to make Visual Studio .vcproj with relative paths

Eric Noulard eric.noulard at gmail.com
Tue Mar 25 14:31:28 EDT 2008


2008/3/25, Olaf van der Spek <olafvdspek at gmail.com>:
> On Tue, Mar 25, 2008 at 12:58 AM, Alexander Neundorf
>  <a.neundorf-work at gmx.net> wrote:
>  >  Not really.
>  >  Why do you actually want to ship VS project files ?
>
> To avoid a dependency on cmake. The library user probably doesn't have
>  cmake installed and it would be nice if he could directly open the
>  .sln file and build the library.
>
>  >  The preferred approach would be to ship the cmake files and if required also
>  >  include cmake itself.
>
>
> Include the cmake installer in every library zip file? That doesn't
>  sound like a good idea.
>  Even if you do, building the library still requires additional steps
>  to generate the .sln and .vcproj files.

If you are afraid to ask your user to run CMake you may
want to write a [possibly NSIS] installer which contains:

1) Your sources
2) CMake installer
3) Any other dependency

then with some [possibly NSIS] scripting you may
automagically

   1) unzip/extract your source tree
   2) install CMake
   3) run cmake (command line) with appropriate arguments
       (may be NSIS installer should ask for the Visual Studio version)
   4) then tell the user that he can safely open the sln/vcproj generated files?

This is some work but seems doable, or am I totally wrong ?

Moreover if you have such NSIS installer some of us may well be
interested in getting it for re-use, since the pattern usage looks
generic to me :=)


-- 
Erk


More information about the CMake mailing list