diff options
| author | untodesu <kirill@untode.su> | 2025-05-13 14:11:58 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-05-13 14:11:58 +0500 |
| commit | 252ee54819888e4699510aa33d66493262d7661e (patch) | |
| tree | 4011579721f216b8e44c15fb02c8e724c40613e7 /deps/CMakeLists.txt | |
| parent | 1450004d428f7b37d31ae412ac56155e84a6c52d (diff) | |
| download | voxelius-252ee54819888e4699510aa33d66493262d7661e.tar.bz2 voxelius-252ee54819888e4699510aa33d66493262d7661e.zip | |
Get rid of binary dependencies
Diffstat (limited to 'deps/CMakeLists.txt')
| -rw-r--r-- | deps/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
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)
|
