compile: add mingw xmake compile arg
This commit is contained in:
parent
1bf2550248
commit
de084c146d
18
xmake.lua
18
xmake.lua
@ -3,10 +3,26 @@ 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")
|
||||
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)
|
Loading…
x
Reference in New Issue
Block a user