KhronosGroup / VK-GL-CTS

Khronos Vulkan, OpenGL, and OpenGL ES Conformance Tests
https://www.khronos.org/
Apache License 2.0
521 stars 290 forks source link

Can't build VS project 2022 #474

Open NavierStokesLiv opened 1 month ago

NavierStokesLiv commented 1 month ago

Hi,

can someone show me how to get passed this error? I am trying to build the VS2022 project but get this:

PS c:\navliv\VK-GL-CTS> cmake "c:\navliv\VK-GL-CTS" -G"Visual Studio 17 2022" -A"Win64"
CMake Warning (dev) at CMakeLists.txt:17 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
CMake Error at CMakeLists.txt:27 (project):
  Failed to run MSBuild command:

    C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe

  to get the value of VCTargetsPath:

    MSBuild version 17.8.3+195e7f5a3 for .NET Framework
    Build started 7/30/2024 7:15:24 PM.

    Project "c:\navliv\VK-GL-CTS\CMakeFiles\3.29.0-rc4\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/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:\navliv\VK-GL-CTS\CMakeFiles\3.29.0-rc4\VCTargetsPath.vcxproj]
    Done Building Project "c:\navliv\VK-GL-CTS\CMakeFiles\3.29.0-rc4\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "c:\navliv\VK-GL-CTS\CMakeFiles\3.29.0-rc4\VCTargetsPath.vcxproj" (default target) (1) ->
    (_CheckForInvalidConfigurationAndPlatform target) ->
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/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:\navliv\VK-GL-CTS\CMakeFiles\3.29.0-rc4\VCTargetsPath.vcxproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.11

  Exit code: 1
NavierStokesLiv commented 1 month ago

Following many tries , looks like the correct method to create VS2022 the solution is by issuing the command:

cmake . -G "Visual Studio 17 2022"

Would you kindly update the main page to reflect the current procedure for building on Windows? The existing instructions are outdated.

https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/vulkancts/README.md

Thank you.