-- fmt 第三方库配置 -- 此文件被主项目通过 includes("fmt") 引入 -- fmt 库 target("fmt") set_kind("static") if is_plat("windows") then add_defines("UNICODE", "_UNICODE") end -- 源文件 add_files("src/format.cc") add_files("src/os.cc") -- 头文件 add_headerfiles("include/fmt/*.h") -- 包含目录 add_includedirs("include", {public = true}) -- 编译定义 add_defines("FMT_HEADER_ONLY=0") -- C++17 标准 set_languages("c++17") -- 编译选项 if is_plat("windows") then add_cxflags("/utf-8") else add_cxflags("-Wall", "-Wextra") end target_end()