Roman Byshko
Roman Byshko

Reputation: 9002

CMake: Use generators for other platforms. How?

Using CMake, how can one generate Visual Studio project files on Linux?

Upvotes: 3

Views: 2026

Answers (3)

DLRdave
DLRdave

Reputation: 14250

You can't. You have to run CMake on Windows to generate for Visual Studio.

Upvotes: 4

Morten Kristensen
Morten Kristensen

Reputation: 7613

Usually you would use the Windows GUI program and select what to generate for. But if you do want to generate them on Linux perhaps you could use wine/crossover to run the Windows generator program.

If you want to have the Visual Studio project files then you will need a Windows machine to compile them in any case. Why not just generate them there as well?

I'm running CMake 2.8.6 and these are the generators I have available:

Unix Makefiles              = Generates standard UNIX makefiles.
Xcode                       = Generate Xcode project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
Eclipse CDT4 - Unix Makefiles
                            = Generates Eclipse CDT 4.0 project files.
KDevelop3                   = Generates KDevelop 3 project files.
KDevelop3 - Unix Makefiles  = Generates KDevelop 3 project files.

Therefore, no generator for Visual Studio.

Upvotes: 3

fmorency
fmorency

Reputation: 784

From the top of my head, this is not supported by CMake (current version 2.8.6).

Upvotes: 0

Related Questions