Cycling74 / min-devkit

Tools, documentation, and reference implementation of a Max Package built using the Min-API.
MIT License
158 stars 31 forks source link

cmake does not generate solution files with Visual Studio 2019 #142

Closed mourendxu closed 4 years ago

mourendxu commented 4 years ago

Running the cmake commandline or the GUI result in the following warning messages and errors. It basically looks like instead of trying to build the solutions, cmake is actually trying to build the project. I am on Win 10, Cmake 3.16.4, Visual Studio Community 2019

Here are the errors I get:

`

cmake -G "Visual Studio 16 2019" -A Win64 .. CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error in CMakeLists.txt: Failed to run MSBuild command:

d:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe

to get the value of VCTargetsPath:

Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 3/15/2020 10:06:17 PM.
mourendxu commented 4 years ago

The solution so far seems to be: generate it for Visual Studio 2015, then open it in 2019 and run the upgrade.

tap commented 4 years ago

I've updated the ReadMe with instructions for Visual Studio 2019. In VS2019, x64 is the default architecture.

I just tested with the updated instructions on Win 10, Cmake 3.16.4, Visual Studio Community 2019 and this worked as desired.

I'll close the issue, but if it continues to be problematic then please feel free to re-open it.

Thanks!

mourendxu commented 4 years ago

Awesome. Thank you.