diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 713442b560a..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/libRocket"] - path = lib/libRocket - url = https://github.com/scp-fs2open/libRocket.git diff --git a/CMakeLists.txt b/CMakeLists.txt index dc5ac74681b..9c27063c886 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,11 +47,6 @@ endif() PROJECT(FS2_Open LANGUAGES ${FSO_LANGUAGES}) -# Check if the external modules exists -IF(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libRocket/Build") - message(FATAL_ERROR "External submodules could not be found. Please make sure you have updated your submodules.") -endif() - LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/finder") diff --git a/lib/libRocket b/lib/libRocket deleted file mode 160000 index b0c18e17d25..00000000000 --- a/lib/libRocket +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b0c18e17d257a46db8395485895185915f483ede diff --git a/lib/libRocket.cmake b/lib/libRocket.cmake index 8d1716dc61f..f27b27cc4df 100644 --- a/lib/libRocket.cmake +++ b/lib/libRocket.cmake @@ -2,7 +2,23 @@ # Build script for libRocket ======= #=================================== -set(LIBROCKET_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libRocket") +# Fetch the libRocket sources. We only consume the source tree here (the +# Rocket* targets below are defined by this script, not by libRocket's own +# build system), and the repository has no top-level CMakeLists.txt, so +# FetchContent_MakeAvailable() populates it without calling add_subdirectory(). +# +# Offline / local development: point FetchContent at an existing checkout to +# skip the download, e.g. +# -DFETCHCONTENT_SOURCE_DIR_LIBROCKET=/path/to/libRocket +# or set FETCHCONTENT_BASE_DIR to a shared cache so clean rebuilds reuse it. +include(FetchContent) +FetchContent_Declare(libRocket + GIT_REPOSITORY https://github.com/scp-fs2open/libRocket.git + GIT_TAG b0c18e17d257a46db8395485895185915f483ede +) +FetchContent_MakeAvailable(libRocket) + +set(LIBROCKET_DIR "${librocket_SOURCE_DIR}") if(COMMAND cmake_policy) cmake_policy(SET CMP0015 NEW)