From 252ee54819888e4699510aa33d66493262d7661e Mon Sep 17 00:00:00 2001 From: untodesu Date: Tue, 13 May 2025 14:11:58 +0500 Subject: Get rid of binary dependencies --- deps/CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'deps/CMakeLists.txt') diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index f688ffd..aadf8ef 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -38,7 +38,18 @@ endfunction() set(PHYSFS_ARCHIVE_ZIP ON CACHE BOOL "" FORCE) set(PHYSFS_ARCHIVE_7Z ON CACHE BOOL "" FORCE) -import_static_library(glfw3) +find_package(glfw3 3.3 QUIET) + +if(NOT glfw3_FOUND) + include(FetchContent) + set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) + FetchContent_Declare(glfw GIT_REPOSITORY https://github.com/glfw/glfw.git GIT_TAG 3.3) + FetchContent_MakeAvailable(glfw) + add_library(glfw3 ALIAS glfw) +endif() add_subdirectory(src/dr_libs) add_subdirectory(src/enet) -- cgit