Skip to content
Snippets Groups Projects
Commit 267e155c authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Restore c++20-compatible fmt library

parent 676efc12
No related branches found
No related tags found
No related merge requests found
...@@ -39,11 +39,11 @@ FetchContent_Declare( ...@@ -39,11 +39,11 @@ FetchContent_Declare(
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git # GIT_REPOSITORY https://github.com/catchorg/Catch2.git
# GIT_TAG v2.11.0 # GIT_TAG v2.11.0
# ) # )
# FetchContent_Declare( FetchContent_Declare(
# fmt fmt
# GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_REPOSITORY https://github.com/fmtlib/fmt.git
# GIT_TAG 6.1.2 GIT_TAG 7.1.3
# ) )
FetchContent_Declare( FetchContent_Declare(
nlohmann_json nlohmann_json
GIT_REPOSITORY https://git.alchemyviewer.org/alchemy/mirrors/modernjson.git GIT_REPOSITORY https://git.alchemyviewer.org/alchemy/mirrors/modernjson.git
...@@ -83,14 +83,11 @@ endif() ...@@ -83,14 +83,11 @@ endif()
# endif() # endif()
# #Download the rest of the libraries # #Download the rest of the libraries
# FetchContent_MakeAvailable(fmt) FetchContent_MakeAvailable(fmt)
set(MESHOPT_BUILD_SHARED_LIBS OFF) set(MESHOPT_BUILD_SHARED_LIBS OFF)
FetchContent_MakeAvailable(meshoptimizer) FetchContent_MakeAvailable(meshoptimizer)
# # Typically you don't care so much for a third party library's tests to be
# # run from your own project's code.
# set(JSON_BuildTests OFF CACHE INTERNAL "")
# If you only include this third party in PRIVATE source files, you do not # If you only include this third party in PRIVATE source files, you do not
# need to install it when your main project gets installed. # need to install it when your main project gets installed.
set(JSON_Install OFF CACHE INTERNAL "") set(JSON_Install OFF CACHE INTERNAL "")
......
...@@ -300,6 +300,7 @@ target_link_libraries( ...@@ -300,6 +300,7 @@ target_link_libraries(
absl::random_random absl::random_random
absl::random_bit_gen_ref absl::random_bit_gen_ref
nlohmann_json::nlohmann_json nlohmann_json::nlohmann_json
fmt::fmt
${DL_LIBRARY} ${DL_LIBRARY}
${RT_LIBRARY} ${RT_LIBRARY}
) )
...@@ -321,6 +322,8 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.15.0") ...@@ -321,6 +322,8 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.15.0")
<thread> <thread>
<absl/container/node_hash_map.h> <absl/container/node_hash_map.h>
<absl/container/flat_hash_map.h> <absl/container/flat_hash_map.h>
<fmt/format.h>
<fmt/compile.h>
) )
endif() endif()
......
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
#ifndef LL_LLFORMAT_H #ifndef LL_LLFORMAT_H
#define LL_LLFORMAT_H #define LL_LLFORMAT_H
#include <fmt/format.h>
#include <fmt/compile.h>
// Use as follows: // Use as follows:
// LL_INFOS() << llformat("Test:%d (%.2f %.2f)", idx, x, y) << LL_ENDL; // LL_INFOS() << llformat("Test:%d (%.2f %.2f)", idx, x, y) << LL_ENDL;
// //
......
...@@ -2109,6 +2109,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ...@@ -2109,6 +2109,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
absl::flat_hash_map absl::flat_hash_map
absl::node_hash_map absl::node_hash_map
nlohmann_json::nlohmann_json nlohmann_json::nlohmann_json
fmt::fmt
) )
if (BUGSPLAT_DB) if (BUGSPLAT_DB)
......
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
#include "absl/container/flat_hash_set.h" #include "absl/container/flat_hash_set.h"
#include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_map.h"
#include <fmt/format.h>
#include <fmt/compile.h>
// Library headers from llcommon project: // Library headers from llcommon project:
#include "indra_constants.h" #include "indra_constants.h"
#include "llinitparam.h" #include "llinitparam.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment