add_rules("mode.debug", "mode.release") set_languages("c++17") if is_plat("windows") then add_cxxflags("/source-charset:utf-8") end if is_plat("mingw") then add_cxxflags("-Wno-unused-variable -finput-charset=utf-8 -fexec-charset=gbk") end if is_mode("debug") then set_suffixname("d") end add_includedirs(path.join(os.scriptdir(), "include"), {public = true}) target("ofen") add_options("boost") set_kind("static") add_files("src/*.cpp") option("boost") boost_root_dir = os.getenv("BOOST_HEADER_DIR") boost_lib_dir = os.getenv("BOOST_LIB_DIR") boost_libs = os.getenv("BOOST_LIBS") add_includedirs(boost_root_dir) print(boost_root_dir) add_defines("USE_BOOST_FILESYSTEM") add_linkdirs(boost_lib_dir) print(boost_lib_dir) add_links(boost_libs) print(boost_libs)