~aleteoryx/muditaos

ref: 06e3bb0f3fd9dcf437f7161cf806fd8577e3933f muditaos/module-utils/third-party/protobuf-lite.cmake -rw-r--r-- 1.8 KiB
06e3bb0f — kkleczkowski Egd 3709 - Application antenna - added parameter history window. (#713) 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
include (thirdparty)

# add sources
set(PROTOBUF_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/protobuf/src)
set(PROTOBUF ${PROTOBUF_SRCDIR}/google/protobuf)
set(PROTOBUF_SOURCES
        ${PROTOBUF}/any_lite.cc
        ${PROTOBUF}/arena.cc
        ${PROTOBUF}/extension_set.cc
        ${PROTOBUF}/generated_enum_util.cc
        ${PROTOBUF}/generated_message_table_driven_lite.cc
        ${PROTOBUF}/generated_message_util.cc
        ${PROTOBUF}/implicit_weak_message.cc
        ${PROTOBUF}/io/coded_stream.cc
        ${PROTOBUF}/io/io_win32.cc
        ${PROTOBUF}/io/strtod.cc
        ${PROTOBUF}/io/zero_copy_stream.cc
        ${PROTOBUF}/io/zero_copy_stream_impl.cc
        ${PROTOBUF}/io/zero_copy_stream_impl_lite.cc
        ${PROTOBUF}/message_lite.cc
        ${PROTOBUF}/parse_context.cc
        ${PROTOBUF}/repeated_field.cc
        ${PROTOBUF}/stubs/bytestream.cc
        ${PROTOBUF}/stubs/common.cc
        ${PROTOBUF}/stubs/int128.cc
        ${PROTOBUF}/stubs/status.cc
        ${PROTOBUF}/stubs/statusor.cc
        ${PROTOBUF}/stubs/stringpiece.cc
        ${PROTOBUF}/stubs/stringprintf.cc
        ${PROTOBUF}/stubs/structurally_valid.cc
        ${PROTOBUF}/stubs/strutil.cc
        ${PROTOBUF}/stubs/time.cc
        ${PROTOBUF}/wire_format_lite.cc
)
target_sources(${PROJECT_NAME} PRIVATE ${PROTOBUF_SOURCES})

# set compile definitions for third party libraries
target_compile_definitions(${PROJECT_NAME} PUBLIC GOOGLE_PROTOBUF_NO_THREADS)

# supress warning for protobuf
set_source_files_properties(${PROTOBUF_SOURCES}
        PROPERTIES COMPILE_FLAGS
	"-Wno-stringop-truncation \
        -Wno-stringop-overflow \
        -Wno-sign-compare \
        -Wno-type-limits  \
        -Wno-redundant-move \
        -Wno-maybe-uninitialized"
)

# add include dir
target_include_directories(${PROJECT_NAME} PUBLIC ${PROTOBUF_SRCDIR})

third_party_source_optimization(${PROTOBUF_SOURCES})