1
0
Fork 0

Use installed protobuf on Linux

This commit is contained in:
Ilya Fedin 2024-04-10 00:06:58 +04:00 committed by John Preston
parent f921cb6aba
commit bf157ab03f

View file

@ -16,7 +16,7 @@ set(cld3_src ${cld3_loc}/src)
set(gen_loc ${cld3_loc}/build/gen)
set(gen_dst ${gen_loc}/cld_3/protos)
if (DESKTOP_APP_USE_PACKAGED)
if (DESKTOP_APP_USE_PACKAGED OR LINUX)
find_package(Protobuf)
if (NOT Protobuf_FOUND)
find_package(protobuf REQUIRED CONFIG)
@ -30,9 +30,6 @@ elseif (WIN32)
else()
set(protoc_executable ${libs_loc}/protobuf/build/protoc)
set(protobuf_lib ${libs_loc}/protobuf/build/libprotobuf-lite.a)
if (LINUX)
target_compile_options(external_cld3_bundled PRIVATE -Wno-implicit-fallthrough)
endif()
endif()
if (PROTOBUF_PROTOC_EXECUTABLE)
set(protoc_executable ${PROTOBUF_PROTOC_EXECUTABLE})
@ -87,13 +84,18 @@ PRIVATE
script_span/fixunicodevalue.cc
)
target_compile_options_if_exists(external_cld3_bundled
PRIVATE
-Wno-implicit-fallthrough
)
target_include_directories(external_cld3_bundled
PUBLIC
${cld3_src}
${gen_loc}
)
if (NOT DESKTOP_APP_USE_PACKAGED)
if (NOT DESKTOP_APP_USE_PACKAGED AND NOT LINUX)
target_include_directories(external_cld3_bundled
PUBLIC
${libs_loc}/protobuf/src