How do I include this in my project I added this to my packages folder

if (spirv_cross_c_shared_FOUND)
        message(STATUS "Found SPIRV-Cross C API! :)")
        message(STATUS "Could not find SPIRV-Cross C API! :(")

target_link_libraries(${PROJECT_NAME} INTERFACE spirv-cross-c-shared)

iam getting this error out\build\x64-debug\LINK : fatal error LNK1104: cannot open file 'spirv-cross-c-shared.lib

usually doing this work add_subdirectory() target_link_libraries() but not in this case. I have added a lot of library to my project but this seems to not work.

also cmake in cmake

1> [CMake] -- SPIRV-Cross: Git hash: fa5ca34+
1> [CMake] SPIRV-Cross:  Testing will be disabled for SPIRV-Cross. Could not find glslang or SPIRV-Tools build under external/. To enable testing, run ./checkout_glslang_spirv_tools.sh and ./build_glslang_spirv_tools.sh first.
1> [CMake] CMake Warning at ExternalLibrary/CMakeLists.txt:85 (find_package):
1> [CMake]   By not providing "Findspirv_cross_c_shared.cmake" in CMAKE_MODULE_PATH this
1> [CMake]   project has asked CMake to find a package configuration file provided by
1> [CMake]   "spirv_cross_c_shared", but CMake did not find one.
1> [CMake] 
1> [CMake]   Could not find a package configuration file provided by
1> [CMake]   "spirv_cross_c_shared" with any of the following names:
1> [CMake] 
1> [CMake]     spirv_cross_c_sharedConfig.cmake
1> [CMake]     spirv_cross_c_shared-config.cmake
1> [CMake] 
1> [CMake]   Add the installation prefix of "spirv_cross_c_shared" to CMAKE_PREFIX_PATH
1> [CMake]   or set "spirv_cross_c_shared_DIR" to a directory containing one of the
1> [CMake]   above files.  If "spirv_cross_c_shared" provides a separate development
1> [CMake]   package or SDK, be sure it has been installed.

what is the correct way to add the this


1 Answer 1

target_link_libraries(${PROJECT_NAME} INTERFACE spirv-cross-c)

this worked hope this helps my fellow newbies.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.