vsg-dev / vsgFramework

Framework for building VulkanScenGraph related projects together
MIT License
10 stars 7 forks source link

ShaderCompile support is disabled #15

Open 640kb opened 1 month ago

640kb commented 1 month ago

There must be an error in vsgFramework. When running CMake, support for ShaderCompile in vsg is disabled because glslang is not found.

cmake -G "NMake Makefiles JOM"  -DCMAKE_INSTALL_PREFIX="D:/project/vk/debug/msvc2022" -DCMAKE_INCLUDE_PATH="D:/project/vk/debug/msvc2022/include" -DCMAKE_LIBRARY_PATH="D:/project/vk/debug/msvc2022/lib" -DCMAKE_PREFIX_PATH="D:/project/vk/debug/msvc2022" -DCMAKE_BUILD_TYPE=Debug ..
-- 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: D:/VS2022-Professional-Installation/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: D:/VS2022-Professional-Installation/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found Vulkan: D:/VulkanSDK/1.3.231.1/Lib/vulkan-1.lib (found version "1.3.231") found components: glslc glslangValidator
-- Populating glslang
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: D:/project/vk/git/vsgFramework/build-debug/components/glslang-subbuild
[ 11%] ←[34m←[1mCreating directories for 'glslang-populate'←[0m
[ 22%] ←[34m←[1mPerforming download step (git clone) for 'glslang-populate'←[0m
Cloning into 'glslang-src'...
remote: Enumerating objects: 56996, done.
remote: Counting objects: 100% (227/227), done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 56996 (delta 117), reused 164 (delta 90), pack-reused 56769
Receiving objects: 100% (56996/56996), 74.65 MiB | 5.58 MiB/s, done.
Resolving deltas: 100% (47877/47877), done.
Your branch is up to date with 'origin/main'.
Already on 'main'
[ 33%] ←[34m←[1mPerforming update step for 'glslang-populate'←[0m
[ 44%] ←[34m←[1mNo patch step for 'glslang-populate'←[0m
[ 55%] ←[34m←[1mNo configure step for 'glslang-populate'←[0m
[ 66%] ←[34m←[1mNo build step for 'glslang-populate'←[0m
[ 77%] ←[34m←[1mNo install step for 'glslang-populate'←[0m
[ 88%] ←[34m←[1mNo test step for 'glslang-populate'←[0m
[100%] ←[34m←[1mCompleted 'glslang-populate'←[0m
[100%] Built target glslang-populate
-- Trying to find local SPIR-V tools
-- optimizer enabled
-- Found Python3: D:/python-3.12.3/python.exe (found version "3.12.3") found components: Interpreter
-- Populating vsg
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: D:/project/vk/git/vsgFramework/build-debug/components/vsg-subbuild
[ 11%] ←[34m←[1mCreating directories for 'vsg-populate'←[0m
[ 22%] ←[34m←[1mPerforming download step (git clone) for 'vsg-populate'←[0m
Cloning into 'vsg-src'...
remote: Enumerating objects: 48625, done.
remote: Counting objects: 100% (2695/2695), done.
remote: Compressing objects: 100% (627/627), done.
remote: Total 48625 (delta 1707), reused 2420 (delta 1627), pack-reused 45930
Receiving objects: 100% (48625/48625), 30.17 MiB | 4.80 MiB/s, done.
Resolving deltas: 100% (33899/33899), done.
Already on 'master'
Your branch is up to date with 'origin/master'.
[ 33%] ←[34m←[1mPerforming update step for 'vsg-populate'←[0m
[ 44%] ←[34m←[1mNo patch step for 'vsg-populate'←[0m
[ 55%] ←[34m←[1mNo configure step for 'vsg-populate'←[0m
[ 66%] ←[34m←[1mNo build step for 'vsg-populate'←[0m
[ 77%] ←[34m←[1mNo install step for 'vsg-populate'←[0m
[ 88%] ←[34m←[1mNo test step for 'vsg-populate'←[0m
[100%] ←[34m←[1mCompleted 'vsg-populate'←[0m
[100%] Built target vsg-populate
-- Reading 'vsg_...' macros from D:/project/vk/git/vsgFramework/build-debug/components/vsg-src/cmake/vsgMacros.cmake - look there for documentation
-- Found Vulkan: D:/VulkanSDK/1.3.231.1/Lib/vulkan-1.lib (found suitable version "1.3.231", minimum required is "1.1.70.0") found components: glslc glslangValidator
-- Could NOT find glslang (missing: glslang_DIR)
CMake Warning at build-debug/components/vsg-src/CMakeLists.txt:52 (message):
  glslang not found.  ShaderCompile support disabled.

-- The following OPTIONAL packages have been found:

 * SPIRV-Tools
 * SPIRV-Tools-opt

-- The following REQUIRED packages have been found:

 * Python3
 * Vulkan (required version >= 1.1.70.0)
 * Threads

-- The following OPTIONAL packages have not been found:

 * glslang (required version >= 14)

-- Populating assimp
-- Configuring done (0.1s)
-- Generating done (0.0s)
robertosfield commented 1 month ago

Looks like glslang repo is being cloned for the purposes of being built. Could you check the contents of repositories that have been cloned within the vsgFramework is see what has been cloned locally.

When I have an opportunity I'll see if I can reproduce the issue - I don't have access my Windows machine this week as my office is being undergoing major refitting!

640kb commented 1 month ago

The content of the build directory "components" looks like this: image