RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.37k stars 244 forks source link

Fail to generate VS projects on Windows because library dxc for Debug configuration is missing #839

Closed RolledNodes closed 4 months ago

RolledNodes commented 4 months ago

Using Visual Studio 2022. CMake version is 3.28.1. VulkanSDK version is 1.3.268.0, and all components including "Shader Toolchain Debug Symbols" are installed.

When I try to generate VS projects, I get the following errors at the prompt.

J:\_Downloads\RBDOOM-3-BFG-671-imgui-docking\build>cmake -G "Visual Studio 17" -A x64 -DFFMPEG=OFF -DBINKDEC=ON ../neo
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.38.33133.0
-- The CXX compiler identification is MSVC 19.38.33133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using module to find Vulkan and components
CMake Warning at C:/Program Files/CMake/share/cmake-3.28/Modules/FindVulkan.cmake:526 (message):
  Library dxc for Debug configuration is missing, imported target Vulkan::dxc
  may not be able to link when targeting this build configuration due to
  incompatible MSVC ABI.  Consider re-installing the Vulkan SDK and request
  debug libraries to fix this warning.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.28/Modules/FindVulkan.cmake:550 (_Vulkan_set_library_component_found)
  CMakeLists.txt:386 (find_package)

-- Found Vulkan: C:/VulkanSDK/1.3.268.0/Lib/vulkan-1.lib (found version "1.3.268") found components: dxc glslc glslangValidator
-- Using Vulkan: C:/VulkanSDK/1.3.268.0/Lib/vulkan-1.lib
CMake Error at CMakeLists.txt:441 (add_subdirectory):
  The source directory

    J:/_Downloads/RBDOOM-3-BFG-671-imgui-docking/neo/extern/nvrhi

  does not contain a CMakeLists.txt file.

-- Found DXCdxil: C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/dxc.exe (found version "10.0.22621.0")
-- Found DXCspirv: C:/VulkanSDK/1.3.268.0/Bin/dxc.exe
-- Shader include path J:/_Downloads/RBDOOM-3-BFG-671-imgui-docking/neo/shaders
-- Configuring incomplete, errors occurred!

J:\_Downloads\RBDOOM-3-BFG-671-imgui-docking\build>pause

Any help?

RobertBeckebans commented 4 months ago

It's not because it couldn't find dxc.exe but it can't find CMakeLists.txt in neo/extern/nvrhi because the submodule isn't properly cloned.

I guess you missed to specify --recursive when you cloned the source code from Github.

Try in J:/_Downloads/RBDOOM-3-BFG-671-imgui-docking

git submodule init git submodule update --recursive

RolledNodes commented 4 months ago

Oh, my apologies, and thank you for answering my very newbie question. I see I had to get it from git instead of simply downloading the zip file. Now I could compile it without any problems. :D

RobertBeckebans commented 4 months ago

No problem. I probably will put a video on my channel because so many people run into this.