summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-03-16 19:08:20 +0100
committerAki <please@ignore.pl>2024-04-05 19:41:19 +0200
commit335ec9b4ec1d9006f6b551f8338fddbcd36a8568 (patch)
treea44833b4b0dcc943f37ff26ab61cd38f3bd2181b
parent2468dd35b23c9b9ca196ed4d9f37be24f032fed2 (diff)
downloadkurator-335ec9b4ec1d9006f6b551f8338fddbcd36a8568.zip
kurator-335ec9b4ec1d9006f6b551f8338fddbcd36a8568.tar.gz
kurator-335ec9b4ec1d9006f6b551f8338fddbcd36a8568.tar.bz2
Switched back to custom MakeAvailable
-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)