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
|
|
|
|
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
2024-01-13 17:09:47 +08:00
|
|
|
GIT_TAG e69e5f977d458f2650bb346dadf2ad30c5320281 # 10.2.1
|
|
|
|
GIT_SHALLOW ON
|
2023-12-23 00:01:05 +08:00
|
|
|
GIT_PROGRESS TRUE
|
|
|
|
)
|
|
|
|
|
|
|
|
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 ()
|