Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpihl committed Nov 5, 2024
1 parent 6e2f2c2 commit dd11025
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ target_compile_definitions(fmt INTERFACE FMT_HEADER_ONLY)
target_compile_definitions(fmt INTERFACE FMT_USE_CONSTEXPR=0)

target_include_directories(fmt
INTERFACE "${STEINWURF_RESOLVE}/fmt-source/include")
INTERFACE "${STEINWURF_RESOLVE}/fmt-source/include")

# Unicode support requires compiling with /utf-8 on MSVC
target_compile_options(fmt INTERFACE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)

add_library(steinwurf::fmt ALIAS fmt)

Expand Down
7 changes: 7 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ def build(bld):
# Create system include for fmt
fmt_include = fmt_path.find_dir("include")


cxxflags = []
if "cl.exe" in bld.env.get_flat("CXX").lower():
# Unicode support requires compiling with /utf-8.
cxxflags += ["/utf-8"]

bld(
name="fmt",
cxxflags=cxxflags,
export_includes=fmt_include.abspath(),
export_defines=[
"FMT_HEADER_ONLY",
Expand Down

0 comments on commit dd11025

Please sign in to comment.