add: xmake script
This commit is contained in:
parent
8789d0695a
commit
3aae41d2e1
@ -3,6 +3,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#ifdef USE_BOOST_FILESYSTEM
|
||||
#include <boost/filesystem.hpp>
|
||||
|
32
xmake.lua
Normal file
32
xmake.lua
Normal file
@ -0,0 +1,32 @@
|
||||
add_rules("mode.debug", "mode.release")
|
||||
set_languages("c++17")
|
||||
if is_plat("windows") then
|
||||
add_cxxflags("/source-charset:utf-8")
|
||||
add_defines("BINARY_GBK")
|
||||
end
|
||||
if is_plat("mingw") then
|
||||
add_cxxflags("-Wno-unused-variable -finput-charset=utf-8 -fexec-charset=gbk")
|
||||
add_defines("BINARY_GBK")
|
||||
end
|
||||
if is_mode("debug") then
|
||||
set_suffixname("d")
|
||||
end
|
||||
add_includedirs(os.scriptdir(), {public = true})
|
||||
target("filecomplete")
|
||||
add_options("boost", "iosish")
|
||||
set_kind("static")
|
||||
add_files("*.cpp")
|
||||
option("boost")
|
||||
set_default(false)
|
||||
set_showmenu(true)
|
||||
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)
|
||||
add_defines("USE_BOOST_FILESYSTEM")
|
||||
add_linkdirs(boost_lib_dir)
|
||||
add_links(boost_libs)
|
||||
option("iosish")
|
||||
set_default(false)
|
||||
set_showmenu(true)
|
||||
add_defines("IOS_ISH", "MFLUSH_STDOUT")
|
Loading…
x
Reference in New Issue
Block a user