File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
# Build protobuf.
18
18
19
+ option (HALO_USE_STATIC_PROTOBUF "Link against static protobuf library" OFF )
20
+
21
+ if (HALO_USE_STATIC_PROTOBUF)
22
+ set (Protobuf_USE_STATIC_LIBS ON )
23
+ endif ()
24
+
19
25
find_package (Protobuf REQUIRED 3.9.1)
20
26
21
27
if (Protobuf_FOUND)
22
28
message (STATUS "Found Protobuf ${Protobuf_VERSION} : ${Protobuf_LIBRARY} " )
23
29
else ()
24
- message (FATAL_ERROR "Protobuf lib not found" )
30
+ message (FATAL_ERROR "Protobuf lib not found" )
25
31
endif (Protobuf_FOUND)
26
32
27
33
macro (gen_protobuf_files)
@@ -42,11 +48,11 @@ macro(gen_protobuf_files)
42
48
43
49
# Add link library and include pathes for generated files.
44
50
set (GEN_TARGET ${_TARGET_NAME} _GEN)
45
- add_library (${GEN_TARGET} OBJECT "" )
51
+ add_library (${GEN_TARGET} OBJECT "" )
46
52
target_sources (${GEN_TARGET} PUBLIC ${ALL_GEN_SRCS} )
47
53
if (HALO_NO_RTTI)
48
54
target_compile_definitions (${GEN_TARGET} PUBLIC -DGOOGLE_PROTOBUF_NO_RTTI=1)
49
- endif ()
55
+ endif ()
50
56
target_link_libraries (${GEN_TARGET} PUBLIC ${Protobuf_LIBRARIES} )
51
57
target_include_directories (${GEN_TARGET} PUBLIC ${Protobuf_INCLUDE_DIRS} ${GEN_DIR} )
52
58
You can’t perform that action at this time.
0 commit comments