diff options
author | Aki <please@ignore.pl> | 2024-04-05 19:41:10 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-04-05 19:41:10 +0200 |
commit | d587bdf60a4cce6c4b691c76c542024c5b3a3736 (patch) | |
tree | 109ac1117f9c485f0bf121583f19816c8460d59c /contrib | |
parent | 7fc41d033a4ff81a907117149eb7cf0851bd6a6b (diff) | |
download | kurator-d587bdf60a4cce6c4b691c76c542024c5b3a3736.zip kurator-d587bdf60a4cce6c4b691c76c542024c5b3a3736.tar.gz kurator-d587bdf60a4cce6c4b691c76c542024c5b3a3736.tar.bz2 |
Push contrib variables to cache and reshuffle them
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/CMakeLists.txt | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index faee8bf..19efd3a 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -1,9 +1,15 @@ -set(BUILD_SHARED_LIBS No) -set(BUILD_GMOCK No) -set(INSTALL_GTEST No) -set(USE_EXTERNAL_GLFW Off) -set(OpenGL_GL_PREFERENCE GLVND) 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() +endfunction() +set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "") +set(ENTT_USE_LIBCPP OFF CACHE INTERNAL "") +set(ENTT_BUILD_TESTING OFF CACHE INTERNAL "") FetchContent_Declare( EnTT GIT_REPOSITORY https://github.com/skypjack/entt.git @@ -11,6 +17,8 @@ FetchContent_Declare( GIT_SHALLOW Yes OVERRIDE_FIND_PACKAGE ) +set(BUILD_GMOCK OFF CACHE INTERNAL "") +set(INSTALL_GTEST OFF CACHE INTERNAL "") FetchContent_Declare( GTest GIT_REPOSITORY https://github.com/google/googletest.git @@ -18,6 +26,7 @@ FetchContent_Declare( GIT_SHALLOW Yes OVERRIDE_FIND_PACKAGE ) +set(JSON_MultipleHeaders ON CACHE INTERNAL "") FetchContent_Declare( nlohmann_json GIT_REPOSITORY https://github.com/nlohmann/json.git @@ -25,6 +34,9 @@ FetchContent_Declare( GIT_SHALLOW Yes OVERRIDE_FIND_PACKAGE ) +set(CMAKE_BUILD_TYPE Release CACHE INTERNAL "") +set(OpenGL_GL_PREFERENCE GLVND CACHE INTERNAL "") +set(USE_EXTERNAL_GLFW OFF CACHE INTERNAL "") FetchContent_Declare( raylib GIT_REPOSITORY https://github.com/raysan5/raylib.git @@ -32,4 +44,7 @@ FetchContent_Declare( GIT_SHALLOW Yes OVERRIDE_FIND_PACKAGE ) -FetchContent_MakeAvailable(EnTT GTest nlohmann_json raylib) +find_package(EnTT REQUIRED 3) +find_package(GTest REQUIRED 1) +find_package(nlohmann_json REQUIRED 3) +find_package(raylib REQUIRED 4) |