diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 7c07c9e3b2..54b11032fa 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -126,8 +126,6 @@ if (rtc_include_tests) { "screen_drawer.cc", "screen_drawer.h", "screen_drawer_linux.cc", - "screen_drawer_lock_posix.cc", - "screen_drawer_lock_posix.h", "screen_drawer_mac.cc", "screen_drawer_win.cc", ] @@ -138,6 +136,13 @@ if (rtc_include_tests) { "../../rtc_base:rtc_base_approved", "../../system_wrappers", ] + + if (is_posix || is_fuchsia) { + sources += [ + "screen_drawer_lock_posix.cc", + "screen_drawer_lock_posix.h", + ] + } } source_set("desktop_capture_mock") { diff --git a/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn index d24b16ba6d..af778fd90c 100644 --- a/system_wrappers/BUILD.gn +++ b/system_wrappers/BUILD.gn @@ -25,8 +25,6 @@ rtc_static_library("system_wrappers") { "source/cpu_features.cc", "source/cpu_info.cc", "source/event.cc", - "source/event_timer_posix.cc", - "source/event_timer_posix.h", "source/event_timer_win.cc", "source/event_timer_win.h", "source/rtp_to_ntp_estimator.cc", @@ -48,6 +46,13 @@ rtc_static_library("system_wrappers") { "../rtc_base/synchronization:rw_lock_wrapper", ] + if (is_posix || is_fuchsia) { + sources += [ + "source/event_timer_posix.cc", + "source/event_timer_posix.h", + ] + } + if (is_android) { defines += [ "WEBRTC_THREAD_RR" ] @@ -208,7 +213,6 @@ if (rtc_include_tests) { testonly = true sources = [ "source/clock_unittest.cc", - "source/event_timer_posix_unittest.cc", "source/metrics_default_unittest.cc", "source/metrics_unittest.cc", "source/ntp_time_unittest.cc", @@ -216,6 +220,12 @@ if (rtc_include_tests) { ] configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + if (is_posix || is_fuchsia) { + sources += [ + "source/event_timer_posix_unittest.cc", + ] + } + if (!build_with_chromium && is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]