[build] CMake: Make Protobuf dependency actually optional (#7291)

This commit is contained in:
Jade
2024-10-25 23:52:38 +08:00
committed by GitHub
parent 46b5631ba7
commit 1cfed736ce

View File

@@ -2,7 +2,9 @@ include(CMakeFindDependencyMacro)
@FILENAME_DEP_REPLACE@
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_dependency(Threads)
find_dependency(Protobuf)
if(@WITH_PROTOBUF@)
find_dependency(Protobuf)
endif()
@FMTLIB_SYSTEM_REPLACE@
if(@USE_SYSTEM_FMTLIB@)