98 lines
2.1 KiB
CMake
98 lines
2.1 KiB
CMake
include(FetchContent)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=int-conversion")
|
|
add_compile_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
|
|
|
|
FetchContent_Declare(
|
|
httplib
|
|
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git
|
|
GIT_TAG v0.28.0
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
nlohmann_json
|
|
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
|
GIT_TAG v3.12.0
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
glaze
|
|
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
|
|
GIT_TAG v6.1.0
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
simdjson
|
|
GIT_REPOSITORY https://github.com/simdjson/simdjson.git
|
|
GIT_TAG v4.2.2
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
ZLIB
|
|
GIT_REPOSITORY https://github.com/madler/zlib.git
|
|
GIT_TAG v1.3.1
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
zstd
|
|
GIT_REPOSITORY https://github.com/facebook/zstd.git
|
|
GIT_TAG v1.5.7
|
|
SOURCE_SUBDIR build/cmake
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
mimalloc
|
|
GIT_REPOSITORY https://github.com/microsoft/mimalloc.git
|
|
GIT_TAG v3.0.10
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
PATCH_COMMAND ${CMAKE_COMMAND}
|
|
-DSOURCE_DIR=<SOURCE_DIR>
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/PatchMimalloc.cmake
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
tl-expected
|
|
GIT_REPOSITORY https://github.com/TartanLlama/expected.git
|
|
GIT_TAG v1.3.1
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
unordered_dense
|
|
GIT_REPOSITORY https://github.com/martinus/unordered_dense.git
|
|
GIT_TAG v4.8.1
|
|
SYSTEM
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
set(MI_BUILD_SHARED ON CACHE BOOL "" FORCE)
|
|
set(MI_BUILD_STATIC ON CACHE BOOL "" FORCE)
|
|
set(MI_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
|
|
set(EXPECTED_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
|
|
set(HTTPLIB_REQUIRE_OPENSSL OFF CACHE BOOL "" FORCE)
|
|
set(HTTPLIB_REQUIRE_ZLIB OFF CACHE BOOL "" FORCE)
|
|
|
|
FetchContent_MakeAvailable(httplib nlohmann_json glaze simdjson ZLIB zstd mimalloc tl-expected unordered_dense)
|
|
|
|
if(NOT TARGET ZLIB::ZLIB)
|
|
add_library(ZLIB::ZLIB ALIAS zlibstatic)
|
|
endif()
|
|
|
|
find_package(OpenSSL REQUIRED)
|