Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate visual studio solution on mac with cmake

Using the CMake GUI, for the same CMakeList, I am able to generate VS solution files on Windows and XCode solution files on Mac. However I am unable to generate VS solution on Mac, as I don't use any VS options under Specify the generator for this project.

I have VS 2017 Community for Mac installed on the Macbook. Is there anything I am missing?

like image 779
John Tan Avatar asked Nov 30 '17 02:11

John Tan


1 Answers

Visual Studio for Mac is very different from Visual Studio.

The former is based on Xamarin Studio, a product of Xamarin Inc., which was acquired by Microsoft in early 2016. Microsoft then basically rebranded Xamarin Studio as Visual Studio for Mac. Note that Xamarin Studio was mainly an IDE for developing mobile apps. Visual Studio for Mac currently has no support for C++.

Because of this, CMake currently does not support Visual Studio for Mac. The Visual Studio generators that ship with CMake only work with the Windows versions of Visual Studio.

And before someone asks: They also don't work with Visual Studio Code, which is yet another product that has little in common with Visual Studio except the name (although there is some effort going on in enabling CMake support in VS Code through plugins).

like image 61
ComicSansMS Avatar answered Oct 31 '22 23:10

ComicSansMS