2024-04-12 01:00:15 +02:00
|
|
|
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
|
|
|
|
if (NOT TARGET solanaceae_util)
|
|
|
|
FetchContent_Declare(solanaceae_util
|
|
|
|
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_util.git
|
|
|
|
GIT_TAG master
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(solanaceae_util)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT TARGET EnTT::EnTT)
|
|
|
|
FetchContent_Declare(EnTT
|
|
|
|
GIT_REPOSITORY https://github.com/skypjack/entt.git
|
|
|
|
GIT_TAG v3.12.2
|
|
|
|
EXCLUDE_FROM_ALL
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(EnTT)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT TARGET nlohmann_json::nlohmann_json)
|
|
|
|
FetchContent_Declare(json
|
|
|
|
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
|
|
|
|
URL_HASH SHA256=d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d
|
|
|
|
EXCLUDE_FROM_ALL
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(json)
|
|
|
|
endif()
|
|
|
|
|
2024-04-12 11:11:09 +02:00
|
|
|
if (NOT TARGET zstd::zstd)
|
|
|
|
# TODO: try find_package() first
|
|
|
|
# TODO: try pkg-config next (will work on most distros)
|
|
|
|
|
|
|
|
set(ZSTD_BUILD_STATIC ON)
|
|
|
|
set(ZSTD_BUILD_SHARED OFF)
|
|
|
|
set(ZSTD_BUILD_PROGRAMS OFF)
|
|
|
|
set(ZSTD_BUILD_CONTRIB OFF)
|
|
|
|
set(ZSTD_BUILD_TESTS OFF)
|
|
|
|
FetchContent_Declare(zstd
|
|
|
|
URL "https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz"
|
|
|
|
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
|
|
|
SOURCE_SUBDIR build/cmake
|
|
|
|
EXCLUDE_FROM_ALL
|
|
|
|
)
|
|
|
|
FetchContent_MakeAvailable(zstd)
|
|
|
|
|
|
|
|
add_library(zstd INTERFACE) # somehow zstd fkd this up
|
|
|
|
target_include_directories(zstd INTERFACE ${zstd_SOURCE_DIR}/lib/)
|
|
|
|
target_link_libraries(zstd INTERFACE libzstd_static)
|
|
|
|
#TODO: new zstd also provides zstd::libzstd
|
|
|
|
add_library(zstd::zstd ALIAS zstd)
|
|
|
|
endif()
|
|
|
|
|
2024-04-12 01:00:15 +02:00
|
|
|
#if (NOT TARGET solanaceae_plugin)
|
|
|
|
#FetchContent_Declare(solanaceae_plugin
|
|
|
|
#GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_plugin.git
|
|
|
|
#GIT_TAG master
|
|
|
|
#)
|
|
|
|
#FetchContent_MakeAvailable(solanaceae_plugin)
|
|
|
|
#endif()
|
|
|
|
|