1

Possible Duplicate:
vcxproj to cmake

Is there a way to generate a CMakeLists.txt for an MSVC solution?

I'm working on an XPlatform project. Right now everything is in MSVC and I'm ready to test on other platforms.

Thanks

Community
  • 1
  • 1
jmasterx
  • 47,653
  • 87
  • 281
  • 523

2 Answers2

2

There was some effort a while back on the cmake mailing lists , this came to nothing (I believe). IF you are going cross platform then the effort if creating your own cmakelists.txt and checking it by creating your visual studio solution from it will be worthwhile as you will be in a good position to increase platform support.

I imagine you will have some issues that will be easier handled by cmake (finding packages/libraries etc.) that will be best solved by manually creating your cmakelists.txt. It also allows you to create out of source builds, distribute cmakelists.txt through your project to increase readability (include subdir et al).

So short answer is probably not what you want, but if you get your head down and create the base cmakelists.txt it will be done before you research this converter much further. As a shortcut (not recommended by everyone ;-) ) you can use GLOB to quickly grab all your files and then LIST REMOVE_ITEM etc. to clear them up. This will speed up creation of the cmake project and allow you to get a head start.

EDIT: I had not come across the tool linked to above, but do have the same conclusion of just create it yourself.

dirvine
  • 49,409
  • 2
  • 13
  • 19
0

I haven't tried it myself but this seems to do the work:

http://sourceforge.net/projects/vcproj2cmake/

Of course you'll always get best result when tweaking by hand.

Mohammad
  • 1,243
  • 1
  • 9
  • 25