Skip to content

fix(cmake): prioritize discovered zlib headers for brpc sources - #5

Open
BGQ99 wants to merge 1 commit into
masterfrom
fix/cmake-zlib-include-order
Open

BGQ99 wants to merge 1 commit into
masterfrom
fix/cmake-zlib-include-order

Conversation

@BGQ99

@BGQ99 BGQ99 commented Aug 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

Explicitly discover zlib and use the ZLIB::ZLIB target instead of the bare z library name.

Place the discovered zlib include directories before include paths inherited from parent projects when compiling SOURCES_LIB. This prevents protobuf's gzip_stream.h from resolving an unrelated zlib.h, such as the header provided by Crypto++.

This keeps standalone builds working while fixing add_subdirectory integration with dependency prefixes such as vcpkg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant