gfxstream: nuke dependency resolution download

BUG=346570230
TEST=cq

Change-Id: I685b064f8a99a1246284b9554e56c4d14c7115c5
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a29a17..79a754a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,13 +11,11 @@
 option(ENABLE_VKCEREAL_TESTS "Enable building vulkan-cereal unittests" OFF)
 option(BUILD_ASAN_WIN32 "Build with ASAN on Windows platform" OFF)
 
-set(VALID_DEPENDENCY_RESOLUTION AOSP SYSTEM DOWNLOAD)
+set(VALID_DEPENDENCY_RESOLUTION AOSP SYSTEM)
 set(DEPENDENCY_RESOLUTION "AOSP"  CACHE STRING "\
-How to resolve the dependencies. Currently there are 3 options: AOSP, SYSTEM and DOWNLOAD. AOSP \
+How to resolve the dependencies. Currently there are 3 options: AOSP, and SYSTEM. AOSP \
 will assume the repo is checked out in an Android tree, and find the dependencies through \
-relative paths. SYSTEM will use the cmake find_package to identify the package. DOWNLOAD will use \
-CMake FetchContent to download the dependencies from the AOSP tree.\
-")
+relative paths. SYSTEM will use the cmake find_package to identify the package.")
 set_property(CACHE DEPENDENCY_RESOLUTION PROPERTY STRINGS ${VALID_DEPENDENCY_RESOLUTION})
 if(NOT DEPENDENCY_RESOLUTION IN_LIST VALID_DEPENDENCY_RESOLUTION)
     message(FATAL_ERROR "DEPENDENCY_RESOLUTION must be one of ${VALID_DEPENDENCY_RESOLUTION}.")
diff --git a/host/magma/CMakeLists.txt b/host/magma/CMakeLists.txt
index 32aece0..349cf71 100644
--- a/host/magma/CMakeLists.txt
+++ b/host/magma/CMakeLists.txt
@@ -1,18 +1,3 @@
-if (LINUX AND DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-    set(
-        gfxstream-magma-server-backend-sources
-        Connection.cpp
-        DrmBuffer.cpp
-        DrmContext.cpp
-        DrmDevice.cpp
-        IntelDrmDecoder.cpp)
-    set(
-        gfxstream-magma-server-backend-defines
-        GFXSTREAM_MAGMA_USE_INTEL_DRM=1)
-    set(
-        gfxstream-magma-server-backend-libs
-        libdrm_headers)
-endif()
 add_library(
     gfxstream-magma-server
     Decoder.cpp
diff --git a/qnx/nto/qnx.nto.toolchain.cmake b/qnx/nto/qnx.nto.toolchain.cmake
index 97b4b05..f0751ec 100644
--- a/qnx/nto/qnx.nto.toolchain.cmake
+++ b/qnx/nto/qnx.nto.toolchain.cmake
@@ -24,8 +24,6 @@
 set(CMAKE_SYSTEM_NAME QNX)
 add_definitions("-D_QNX_SOURCE")
 
-set(DEPENDENCY_OVERRIDE "DOWNLOAD")
-
 set(GENERATE_PINFO_FILES $ENV{GENERATE_PINFO_FILES})
 
 set(target gcc_nto$ENV{VARIANT})
@@ -39,4 +37,4 @@
 set(CMAKE_RANLIB $ENV{QNX_HOST}/usr/bin/nto${processor}-ranlib CACHE PATH "QNX ranlib Program" FORCE)
 set(CMAKE_AR $ENV{QNX_HOST}/usr/bin/nto${processor}-ar CACHE PATH "QNX ar Program" FORCE)
 set(CMAKE_SYSROOT $ENV{QNX_TARGET})
-set(CMAKE_CXX_STANDARD 20)
\ No newline at end of file
+set(CMAKE_CXX_STANDARD 20)
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 5537c7f..ac85e9a 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -35,17 +35,6 @@
         find_package(PkgConfig REQUIRED)
         pkg_search_module(lz4 REQUIRED IMPORTED_TARGET GLOBAL liblz4)
         add_library(lz4_static ALIAS PkgConfig::lz4)
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            lz4
-            GIT_REPOSITORY https://android.googlesource.com/platform/external/lz4
-            GIT_REMOTE_NAME aosp
-            GIT_TAG aosp/master
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-            SOURCE_SUBDIR build/cmake
-        )
-        FetchContent_MakeAvailable(lz4)
     endif()
 endif()
 
@@ -67,16 +56,6 @@
         add_library(gtest_main ALIAS PkgConfig::gtest_main)
         add_library(gmock ALIAS PkgConfig::gmock)
         add_library(gmock_main ALIAS PkgConfig::gmock_main)
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            googletest
-            GIT_REPOSITORY https://android.googlesource.com/platform/external/googletest
-            GIT_REMOTE_NAME aosp
-            GIT_TAG aosp/master
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(googletest)
     endif()
 endif()
 
@@ -164,16 +143,6 @@
         add_library(aemu_common INTERFACE)
         target_link_libraries(aemu_common INTERFACE aemu-base aemu-host-common)
         target_include_directories(aemu_common INTERFACE aemu-base.headers aemu-host-common.headers)
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            aemu_common
-            GIT_REPOSITORY https://android.googlesource.com/platform/hardware/google/aemu
-            GIT_REMOTE_NAME aosp
-            GIT_TAG aosp/master
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(aemu_common)
     endif()
 endif()
 
@@ -189,16 +158,6 @@
         target_include_directories(gfxstream_vulkan_headers INTERFACE ${Vulkan_INCLUDE_DIRS})
         target_compile_definitions(gfxstream_vulkan_headers
                                    INTERFACE VK_GFXSTREAM_STRUCTURE_TYPE_EXT)
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            gfxstream_protocols
-            GIT_REPOSITORY https://android.googlesource.com/platform/external/gfxstream-protocols
-            GIT_REMOTE_NAME aosp
-            GIT_TAG aosp/master
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(gfxstream_protocols)
     endif()
 endif()
 
@@ -218,16 +177,6 @@
         find_program(FLATC flatc NO_CACHE REQUIRED)
         add_executable(flatc IMPORTED GLOBAL)
         set_property(TARGET flatc PROPERTY IMPORTED_LOCATION ${FLATC})
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            flatbuffers
-            GIT_REPOSITORY https://android.googlesource.com/platform/external/flatbuffers
-            GIT_REMOTE_NAME aosp
-            GIT_TAG aosp/master
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(flatbuffers)
     endif()
 endif()
 
@@ -249,18 +198,6 @@
         find_package(PkgConfig REQUIRED)
         pkg_search_module(egl REQUIRED IMPORTED_TARGET GLOBAL egl>=1.5)
         add_library(gfxstream_egl_headers ALIAS PkgConfig::egl)
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            egl
-            GIT_REPOSITORY https://github.com/KhronosGroup/EGL-Registry.git
-            GIT_TAG main
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(egl)
-        add_library(gfxstream_egl_headers INTERFACE)
-        target_include_directories(gfxstream_egl_headers INTERFACE ${egl_SOURCE_DIR}/api)
-    endif()
 endif()
 
 if(WITH_BENCHMARK)
@@ -276,15 +213,6 @@
         endif()
     elseif(DEPENDENCY_RESOLUTION STREQUAL "SYSTEM")
         message(FATAL_ERROR "Not implemented")
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            google_benchmark
-            GIT_REPOSITORY https://github.com/google/benchmark.git
-            GIT_TAG v1.7.0
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(google_benchmark)
-    endif()
 endif()
 
 if(NOT TARGET libdrm_headers)
@@ -299,18 +227,6 @@
         find_package(PkgConfig REQUIRED)
         pkg_search_module(drm REQUIRED IMPORTED_TARGET GLOBAL libdrm)
         add_library(libdrm_headers ALIAS PkgConfig::drm)
-    elseif(DEPENDENCY_RESOLUTION STREQUAL "DOWNLOAD")
-        FetchContent_Declare(
-            drm
-            GIT_REPOSITORY https://gitlab.freedesktop.org/mesa/drm.git
-            GIT_TAG main
-            GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
-            GIT_PROGRESS TRUE
-        )
-        FetchContent_MakeAvailable(drm)
-        add_library(libdrm_headers INTERFACE)
-        target_include_directories(libdrm_headers INTERFACE ${drm_SOURCE_DIR}/include/drm)
-    endif()
 endif()
 
 if(NOT TARGET aemu_common)