2023-12-23 00:01:05 +08:00
|
|
|
include(FetchContent)
|
2023-12-23 20:03:02 +08:00
|
|
|
|
2023-12-23 00:01:05 +08:00
|
|
|
FetchContent_Declare(
|
|
|
|
fmt
|
2024-03-16 20:26:21 +08:00
|
|
|
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
|
2024-11-25 16:35:32 +08:00
|
|
|
URL https://github.com/fmtlib/fmt/archive/refs/tags/11.0.2.tar.gz
|
|
|
|
URL_HASH SHA256=6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f)
|
2023-12-23 00:01:05 +08:00
|
|
|
FetchContent_GetProperties(fmt)
|
|
|
|
if(NOT fmt_POPULATED)
|
|
|
|
FetchContent_Populate(fmt)
|
2023-12-23 20:03:02 +08:00
|
|
|
# We do not require os features of fmt
|
2023-12-23 00:01:05 +08:00
|
|
|
set(FMT_OS OFF CACHE BOOL "Disable FMT_OS" FORCE)
|
2023-12-24 18:28:02 +08:00
|
|
|
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
|
2023-12-24 22:26:28 +08:00
|
|
|
set_target_properties(fmt PROPERTIES FOLDER "third-party")
|
2023-12-23 20:03:02 +08:00
|
|
|
endif ()
|