Use installed protobuf on Linux
This commit is contained in:
parent
f921cb6aba
commit
bf157ab03f
1 changed files with 7 additions and 5 deletions
12
external/cld3/CMakeLists.txt
vendored
12
external/cld3/CMakeLists.txt
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue