summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/CMakeLists.txt21
1 files changed, 10 insertions, 11 deletions
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt
index 19efd3a..3d98ee4 100644
--- a/contrib/CMakeLists.txt
+++ b/contrib/CMakeLists.txt
@@ -1,11 +1,13 @@
add_subdirectory(imgui)
-function(MakeAvailable DEPNAME)
- string(TOLOWER "${DEPNAME}" DEPNAME)
- FetchContent_GetProperties(${DEPNAME})
- if(NOT ${DEPNAME}_POPULATED)
- FetchContent_Populate(${DEPNAME})
- add_subdirectory(${${DEPNAME}_SOURCE_DIR} ${${DEPNAME}_BINARY_DIR} EXCLUDE_FROM_ALL)
- endif()
+function(MakeAvailable)
+ foreach(DEPNAME IN LISTS ARGN)
+ string(TOLOWER "${DEPNAME}" DEPNAME)
+ FetchContent_GetProperties(${DEPNAME})
+ if(NOT ${DEPNAME}_POPULATED)
+ FetchContent_Populate(${DEPNAME})
+ add_subdirectory(${${DEPNAME}_SOURCE_DIR} ${${DEPNAME}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ endforeach()
endfunction()
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
set(ENTT_USE_LIBCPP OFF CACHE INTERNAL "")
@@ -44,7 +46,4 @@ FetchContent_Declare(
GIT_SHALLOW Yes
OVERRIDE_FIND_PACKAGE
)
-find_package(EnTT REQUIRED 3)
-find_package(GTest REQUIRED 1)
-find_package(nlohmann_json REQUIRED 3)
-find_package(raylib REQUIRED 4)
+MakeAvailable(EnTT GTest nlohmann_json raylib)