google / shaderc

A collection of tools, libraries, and tests for Vulkan shader compilation.
Other
1.86k stars 363 forks source link

[Documentation] gmock appears to be necessary for shaderc #1406

Open rubyFeedback opened 8 months ago

rubyFeedback commented 8 months ago

Could the main README briefly mention that gmock is a dependency; and where to get it? Ideally in the main README, or some FAQ entry on the wiki or something like that. That way people who want to get shaderc for the vulkan-releated stuff, know where to go to next. Thanks for reading.

ben-clayton commented 8 months ago

The step to fetch the dependency is listed in the root README:

https://github.com/google/shaderc?tab=readme-ov-file#getting-and-building-shaderc


  1. Check out the source code:
    git clone https://github.com/google/shaderc $SOURCE_DIR
    cd $SOURCE_DIR
    ./utils/git-sync-deps

You need to call ./utils/git-sync-deps.

Zopolis4 commented 4 months ago

I think the confusion here results from a missing googletest being reported as a missing gmock, even though gmock was absorbed into googletest some time ago.

third_party/CMakeLists.txt:

# Configure third party projects.
if(${SHADERC_ENABLE_TESTS})
  if (IS_DIRECTORY ${SHADERC_GOOGLE_TEST_DIR})
    add_subdirectory(${SHADERC_GOOGLE_TEST_DIR} googletest)
  endif()
  if (NOT TARGET gmock)
    message(FATAL_ERROR "gmock was not found - required for tests")
  endif()
endif()