diff --git a/cmake/external_libs/protobuf.cmake b/cmake/external_libs/protobuf.cmake index 8be594c7..fb68a3c6 100644 --- a/cmake/external_libs/protobuf.cmake +++ b/cmake/external_libs/protobuf.cmake @@ -1,5 +1,5 @@ if (NOT TARGET protobuf::protobuf) -set(protobuf_USE_STATIC_LIBS ON) +set(protobuf_USE_STATIC_LIBS OFF) set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2") set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") set(_ge_tmp_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) @@ -21,7 +21,7 @@ graphengine_add_pkg(protobuf URL ${REQ_URL} MD5 ${MD5} CMAKE_PATH ../cmake/ - CMAKE_OPTION -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF) + CMAKE_OPTION -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=ON) set(CMAKE_CXX_FLAGS ${_ge_tmp_CMAKE_CXX_FLAGS}) endif() add_library(graphengine::protobuf ALIAS protobuf::protobuf)