google / google/shaderc

Shaderc has linking conflicts when compiling on Windows.

Open
#1,596 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
445
Avg merge
11h 6m
Merged PRs (30d)
6

Description

Image

shaderc is compiled from source as a third-party library in my project, how to solve it?

```cmake
set(SHADERC_SKIP_TESTS ON)
set(SHADERC_SKIP_EXAMPLES ON)
set(SHADERC_SKIP_EXECUTABLES ON)
set(SHADERC_SKIP_COPYRIGHT_CHECK ON)
set(SHADERC_ENABLE_HLSL OFF)
add_subdirectory(${CMAKE_SOURCE_DIR}/third_party/shaderc)
target_link_libraries(${FAIRY_VIEWER_CORE} PUBLIC shaderc)
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Windows linker conflict using the reported CMake configuration, including add_subdirectory for shaderc and linking the shaderc target. Inspect the complete linker diagnostic and shaderc's CMake target setup; done means the third-party build links cleanly in the reported consumer project.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.