@@ -54,7 +54,7 @@ endif()
5454
5555function (livekit_enable_strict_compile_warnings target_name )
5656 if (MSVC )
57- target_compile_options (${target_name} PRIVATE /permissive- /Zc:__cplusplus /W4 /WX )
57+ target_compile_options (${target_name} PRIVATE /permissive- /Zc:__cplusplus /W4 /WX /wd4251 )
5858 else ()
5959 target_compile_options (${target_name} PRIVATE
6060 -Wall
@@ -134,12 +134,12 @@ else()
134134 message (FATAL_ERROR "No protobuf library target found (expected protobuf::libprotobuf)" )
135135endif ()
136136
137- set (LIVEKIT_EXTERNAL_SYSTEM_INCLUDE_DIRS
137+ set (LIVEKIT_PROTO_INCLUDE_DIRS
138138 "${PROTO_BINARY_DIR} "
139139 ${Protobuf_INCLUDE_DIRS}
140140)
141+ set (LIVEKIT_EXTERNAL_SYSTEM_INCLUDE_DIRS)
141142foreach (_livekit_system_include_target
142- protobuf::libprotobuf
143143 absl::base
144144 spdlog::spdlog
145145 spdlog)
@@ -154,10 +154,7 @@ foreach(_livekit_system_include_target
154154endforeach ()
155155list (REMOVE_DUPLICATES LIVEKIT_EXTERNAL_SYSTEM_INCLUDE_DIRS)
156156
157- target_include_directories (livekit_proto PRIVATE
158- "${PROTO_BINARY_DIR} "
159- ${Protobuf_INCLUDE_DIRS}
160- )
157+ target_include_directories (livekit_proto PRIVATE ${LIVEKIT_PROTO_INCLUDE_DIRS} )
161158target_link_libraries (livekit_proto PRIVATE ${LIVEKIT_PROTOBUF_TARGET} )
162159if (TARGET absl::base)
163160 get_target_property (_absl_inc absl::base INTERFACE_INCLUDE_DIRECTORIES )
@@ -444,6 +441,10 @@ add_library(livekit SHARED
444441 src/trace/trace_event.h
445442 src/trace/tracing.cpp
446443)
444+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
445+ set_source_files_properties (src/trace/event_tracer.cpp
446+ PROPERTIES COMPILE_OPTIONS "-Wno-error=type-limits" )
447+ endif ()
447448# Symbol visibility: keep liblivekit's exported ABI restricted to the public
448449# LiveKit API. By default everything is hidden unless marked by the LIVEKIT_API
449450# macro in code
@@ -466,6 +467,10 @@ endif()
466467
467468target_sources (livekit PRIVATE $<TARGET_OBJECTS :livekit_proto >)
468469
470+ target_include_directories (livekit
471+ BEFORE PRIVATE
472+ ${LIVEKIT_PROTO_INCLUDE_DIRS}
473+ )
469474target_include_directories (livekit
470475 PUBLIC
471476 $<BUILD_INTERFACE :${LIVEKIT_ROOT_DIR} /include >
0 commit comments