diff options
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)
|
