How to support both vcxproj in cmake in a project?

I am developing a cross-platform C ++ project. The initial idea is to work with msvc2010 and later compile for other systems using CMake and Hudson. It seems that it is not convenient to manually modify the CMake files after the changes in the studio settings.

So, the easiest way: to write a parser for vcxproj and vcxproj.filters, or is there another good solution?

+43
visual-studio visual-studio-2010 cmake makefile gyp
Jul 11 2018-11-11T00:
source share
2 answers

It may be useful to use this type of conversion from time to time, say, for porting. In my travels, I found the following, in a certain order:

In particular, for VS to CMake / GYP :

  • vcproj2cmake
  • vcxproj2cmake (not a typo!)
  • gypify.py is a .sln / solution-reading GYP file generator. Gyp is an alternative to Cmake, which is currently used by the Chromium project (the base for the Google Chrome browser). Gyp will output Makefile, Visual Studio, or Xcode files (see the Gyp switch '-f [make | scons | msvc | xcode]'). This Python script is pretty promising, I hope to change it soon to correctly specify the header folders for the gcc '-I' include parameter.

Other Cmake / Make-related Conversion Tools:

Greetings

Rich

+45
Feb 22 2018-12-12T00:
source share
— -

You go back to it - set up your entire CMakeLists.txt, and then generate the MSVC project.

It does not have to be heavy or time consuming. Basically you just need to tell which directories to look for, declare your include paths, collect * .cpps for each library using the glob expression, and declare your dependencies.

If you need to configure anything else, then your project is probably not very portable: - /

+12
Jul 11 '11 at 11:48
source share



All Articles