From 3b5f351e28546219e18097dbe577206592e6bd86 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Sun, 13 Nov 2022 12:56:27 +0100 Subject: [PATCH] Put all FetchContent_declare in one place --- CMakeLists.txt | 16 +++++++++------- client/CMakeLists.txt | 4 ---- common/CMakeLists.txt | 2 -- server/CMakeLists.txt | 6 ------ 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee1d4c2f..a4c1b9ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,8 +62,16 @@ if(ANDROID) android_ndk_import_module_native_app_glue() endif() +FetchContent_Declare(spdlog URL https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz) +FetchContent_Declare(glm URL https://github.com/g-truc/glm/archive/refs/tags/0.9.9.8.tar.gz) +FetchContent_Declare(tinygltf URL https://github.com/syoyo/tinygltf/archive/refs/tags/v2.6.3.tar.gz) FetchContent_Declare(boostpfr URL https://github.com/boostorg/pfr/archive/refs/tags/2.0.3.tar.gz) -FetchContent_MakeAvailable(boostpfr) +FetchContent_Declare(monado + GIT_REPOSITORY https://gitlab.freedesktop.org/xytovl/monado + GIT_TAG 9044e870696f39ace2293488ad5e663f366031a6 + ) + + add_subdirectory(common) @@ -74,9 +82,3 @@ endif() if (WIVRN_BUILD_SERVER) add_subdirectory(server) endif() - - -get_property(importTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS) -get_property(buildsystemTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY BUILDSYSTEM_TARGETS) -message("Imported targets: ${importTargets}") -message("Build system targets: ${buildsystemTargets}") diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 5971cdd6..71fd8237 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -6,10 +6,6 @@ set(TINYGLTF_BUILD_BUILDER_EXAMPLE OFF) set(TINYGLTF_HEADER_ONLY OFF) set(TINYGLTF_INSTALL OFF) -FetchContent_Declare(spdlog URL https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz) -FetchContent_Declare(glm URL https://github.com/g-truc/glm/archive/refs/tags/0.9.9.8.tar.gz) -FetchContent_Declare(tinygltf URL https://github.com/syoyo/tinygltf/archive/refs/tags/v2.6.3.tar.gz) - FetchContent_MakeAvailable(spdlog glm tinygltf) include(FreetypeHarfbuzz) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 3d8944ca..eb810b7b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,6 +1,4 @@ -FetchContent_Declare(boostpfr URL https://github.com/boostorg/pfr/archive/refs/tags/2.0.3.tar.gz) - FetchContent_MakeAvailable(boostpfr) if (GIT_VERSION) diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 7850ea6b..112653c0 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -38,11 +38,6 @@ set(BUILD_TESTING OFF) set(XRT_IPC_MSG_SOCK_FILENAME "wivrn_comp_ipc") set(RUNTIME_BARE_SUFFIX "wivrn") -FetchContent_Declare(monado - GIT_REPOSITORY https://gitlab.freedesktop.org/xytovl/monado - GIT_TAG 9044e870696f39ace2293488ad5e663f366031a6 - ) - FetchContent_GetProperties(monado) if(NOT monado_POPULATED) # Fetch the content using previously declared details @@ -59,7 +54,6 @@ add_executable(monado-wivrn hostname.cpp avahi_publisher.cpp - driver/encoder_settings.cpp driver/wivrn_hmd.cpp driver/wivrn_comp_target.cpp