[CMake] Can't Generate Project Files for VS2019

Jano Svitok jan.svitok at gmail.com
Sun Apr 28 15:25:27 EDT 2019


Hi,

Use 'x64' as platform.

Jano

On Sun, Apr 28, 2019, 13:36 Osman Zakir <osmanzakir90 at hotmail.com> wrote:

> I just tried to build Step 1 of the CMake tutorial that comes with the
> source code (CMake version 3.14.3), once with VS2019 as the generator and
> then again with VS2017 as the generator.  The latter worked fine but the
> former didn't.  I got the same error as mentioned in the initial message:
>
> "
> cmake -G"Visual Studio 16 2019" -A Win64
> -DCMAKE_INSTALL_PREFIX="C:/Program Files/binaryen"
> -DCMAKE_BUILD_TYPE=Release ../
> CMake Error at CMakeLists.txt:1 (PROJECT):​
>   Failed to run MSBuild command:​
>>     C:/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.0.461+g6ff56ef63c for .NET
> Framework​
>     Copyright (C) Microsoft Corporation. All rights reserved.​
>>     Build started 4/27/2019 5:48:57 PM.​
>     Project "C:\binaryen\build\CMakeFiles\3.14.3\VCTargetsPath.vcxproj" on
> node 1 (default targets).​
>     C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(775,5):
> error : The OutputPath property is not set for project
> 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified
> a valid combination of Configuration and Platform for this project.
> Configuration='Debug'  Platform='Win64'.  You may be seeing this message
> because you are trying to build a project without a solution file, and have
> specified a non-default Configuration or Platform that doesn't exist for
> this project. [C:\binaryen\build\CMakeFiles\3.14.3\VCTargetsPath.vcxproj]​
>     Done Building Project
> "C:\binaryen\build\CMakeFiles\3.14.3\VCTargetsPath.vcxproj" (default
> targets) -- FAILED.​
>>     Build FAILED.​
>>     "C:\binaryen\build\CMakeFiles\3.14.3\VCTargetsPath.vcxproj" (default
> target) (1) ->​
>     (_CheckForInvalidConfigurationAndPlatform target) ->​
>       C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(775,5):
> error : The OutputPath property is not set for project
> 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified
> a valid combination of Configuration and Platform for this project.
> Configuration='Debug'  Platform='Win64'.  You may be seeing this message
> because you are trying to build a project without a solution file, and have
> specified a non-default Configuration or Platform that doesn't exist for
> this project. [C:\binaryen\build\CMakeFiles\3.14.3\VCTargetsPath.vcxproj]​
>>         0 Warning(s)​
>         1 Error(s)​
>>     Time Elapsed 00:00:00.20​
>>>   Exit code: 1​
>>>> -- Configuring incomplete, errors occurred!​
> See also "C:/binaryen/build/CMakeFiles/CMakeOutput.log".
> "
>
> When I try to look at the .vcxproj file mentioned in the error, I see that
> it can't find VS2019 Build Tools even though I do have them.  I asked on
> MSDN forums but I don't have a reply there yet.  And I don't know how to
> fix the issue myself, either.
>
> I would like for someone to please help me out with this.  Is there a way
> for me to fix this problem?  Like some sort of patch that can be added
> somewhere?  I installed the binary for CMake 3.14.3 initially and only got
> the source code to try out the tutorial as a test for CMake; I'm not
> planning to try and build CMake.
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190428/1b53842b/attachment.html>


More information about the CMake mailing list