Open cheneym2 opened 3 weeks ago
that's pretty much the correct solution, but it might be slightly nicer to do with adding a REQUIRED_BY
argument to the copy-prebuilt-binaries target, or adding a REQUIRES
to slang-test (and friends). whatever's neater. cmake generator expressions can be used to make the conditional tidy and not
This issue was discovered in the VS2022 workflow.
1) IMPORTANT: Clean out any existing build/Release/bin and build/Debug/bin contents, as you won't notice the issue if there are files there from a previous build attempt.
2) Initialize the VS solution file:
cmake --preset vs2022
3) Open build/slang.sln file in visual studio
4) Build by clicking the "Local Windows Debugger" icon (IMPORTANT, Do Not Use Build Solution)
The former method will only build the current project and its dependencies. It will not install D3D12 binaries and slang-tests using D3D12 will not work.
Observe: NVIDIA.COM+acheney@acheney-lt3 /cygdrive/c/Users/acheney/Documents/git/slang5
D3D12 libraries are installed by a vcproj named "copy-prebuilt-binaries" and that is a dependency of the whole solution, so using the "Build Solution" command does not see this issue.
Observe the contents of the build folder AFTER using the Build Solution command. It has the D3D12 folder (and many other files). slang-test d3d12 tests will work after doing that.
There should be a dependency placed between slang-test and any other apps we run in the slang solution that depend on D3D12 libraries.
Inserting this at the end of CMakeLists.txt works, but it seems like a hack.