DTolm / VkFFT

Vulkan/CUDA/HIP/OpenCL/Level Zero/Metal Fast Fourier Transform library
MIT License
1.48k stars 88 forks source link

[1.3.4] #include glslang_c_interface.h -> glslang/Include/glslang_c_interface.h #153

Open picca opened 4 months ago

picca commented 4 months ago

Hello,

I am preparing the Debian package for vkfft and I need to patch the code in order to use the system glslang library.

the pkgconfig file of slang contain this

prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: glslang
Description: OpenGL and OpenGL ES shader front end and validator
Requires:
Version: 
Libs: -L${libdir} -lglslang -lMachineIndependent -lOSDependent -lSPVRemapper -lpthread
Cflags: -I${includedir}

So the default directory for the include path is /usr/include

then the package provide these files

/.
/usr
/usr/include
/usr/include/glslang
/usr/include/glslang/Include
/usr/include/glslang/Include/ResourceLimits.h
/usr/include/glslang/Include/glslang_c_interface.h
/usr/include/glslang/Include/glslang_c_shader_types.h
/usr/include/glslang/MachineIndependent
/usr/include/glslang/MachineIndependent/Versions.h
/usr/include/glslang/Public
/usr/include/glslang/Public/ResourceLimits.h
/usr/include/glslang/Public/ShaderLang.h
/usr/include/glslang/Public/resource_limits_c.h
/usr/include/glslang/SPIRV
/usr/include/glslang/SPIRV/GlslangToSpv.h
/usr/include/glslang/SPIRV/Logger.h
/usr/include/glslang/SPIRV/SPVRemapper.h
/usr/include/glslang/SPIRV/disassemble.h
/usr/include/glslang/SPIRV/spirv.hpp
/usr/include/glslang/build_info.h

So it seems to me that the expected #include should be

#include  glslang/Include/glslang_c_interface.h

thanks for considering

Frederic

DTolm commented 4 months ago

Hello,

Sure, I replaced the relative path with the full path to glslang_c_interface. Previously I just used target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/glslang-main/glslang/Include/) in CMakeLists to get the correct path.

Best regards, Dmitrii