Fix missing includes in fmt.cc (#3994)

This causes duplicated std definitions in the fmt module
This commit is contained in:
LoveSy
2024-06-09 04:50:29 +08:00
committed by GitHub
parent a3d95971be
commit 0f6e716548
4 changed files with 14 additions and 5 deletions

View File

@@ -63,6 +63,8 @@ function(add_module_library name)
target_compile_options(${name} PUBLIC -fmodules-ts)
endif ()
target_compile_definitions(${name} PRIVATE FMT_MODULE)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.28 AND CMAKE_GENERATOR STREQUAL "Ninja")
target_sources(${name} PUBLIC FILE_SET fmt TYPE CXX_MODULES FILES ${sources})
else()