From 8ce0e8f9f60d2e5d9e9540062306fd7aa3ae2934 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Wed, 25 Sep 2024 15:11:04 -0400 Subject: [PATCH] Changed more deps to use FetchContent --- .gitmodules | 9 --------- lib/CMakeLists.txt | 27 ++++++++++++++++----------- lib/SDL | 1 - lib/freetype | 1 - lib/glfw | 1 - lib/libarchive | 1 - 6 files changed, 16 insertions(+), 24 deletions(-) delete mode 160000 lib/SDL delete mode 160000 lib/freetype delete mode 160000 lib/glfw delete mode 160000 lib/libarchive diff --git a/.gitmodules b/.gitmodules index 75568b22..f87538e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,6 @@ -[submodule "lib/glfw"] - path = lib/glfw - url = https://github.com/glfw/glfw.git [submodule "lib/openal-soft"] path = lib/openal-soft url = https://github.com/kcat/openal-soft [submodule "lib/AudioFile"] path = lib/AudioFile url = https://github.com/adamstark/AudioFile.git -[submodule "lib/freetype"] - path = lib/freetype - url = https://gitlab.freedesktop.org/freetype/freetype.git -[submodule "lib/libarchive"] - path = lib/libarchive - url = https://github.com/libarchive/libarchive diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 8fc80e12..2681eb3f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -5,7 +5,7 @@ include(FetchContent) -# add_subdirectory(glm) +# GLM FetchContent_Declare( glm GIT_REPOSITORY https://github.com/g-truc/glm.git @@ -13,20 +13,25 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(glm) -if(DAWN_TARGET STREQUAL "linux-x64-glfw") - add_subdirectory(glad) - add_subdirectory(glfw) - add_subdirectory(libarchive) - add_subdirectory(freetype) -else() - message(FATAL_ERROR "Unknown target: ${DAWN_TARGET}") -endif() - # JSON - FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz) FetchContent_MakeAvailable(json) +# GLAD +add_subdirectory(glad) + +# GLFW +FetchContent_Declare(glfw URL https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip) +FetchContent_MakeAvailable(glfw) + +# LibArchive +FetchContent_Declare(libarchive URL https://github.com/libarchive/libarchive/releases/download/v3.7.6/libarchive-3.7.6.tar.xz) +FetchContent_MakeAvailable(libarchive) + +# FreeType +FetchContent_Declare(freetype URL https://psychz.dl.sourceforge.net/project/freetype/freetype2/2.13.3/freetype-2.13.3.tar.xz?viasf=1) +FetchContent_MakeAvailable(freetype) + # if(DAWN_TARGET_OPENAL) # set(LIBTYPE "STATIC") # add_subdirectory(openal-soft) diff --git a/lib/SDL b/lib/SDL deleted file mode 160000 index fb149756..00000000 --- a/lib/SDL +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fb1497566c5a05e2babdcf45ef0ab5c7cca2c4ae diff --git a/lib/freetype b/lib/freetype deleted file mode 160000 index 7ff43d3e..00000000 --- a/lib/freetype +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7ff43d3e9f981991048a459303e431bf0c617a36 diff --git a/lib/glfw b/lib/glfw deleted file mode 160000 index b35641f4..00000000 --- a/lib/glfw +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b35641f4a3c62aa86a0b3c983d163bc0fe36026d diff --git a/lib/libarchive b/lib/libarchive deleted file mode 160000 index 313aa1fa..00000000 --- a/lib/libarchive +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 313aa1fa10b657de791e3202c168a6c833bc3543