add_rules("mode.debug", "mode.release")
set_languages("c++17")
add_includedirs(os.scriptdir())
target("tsc")
	add_options("boost")
	set_kind("binary")
	add_files("*.cpp")
	add_deps("ofen")
	add_deps("trans_util")
	add_deps("trans_net")
	
	if is_plat("mingw") then
		add_links("ws2_32", "wsock32")
	end
	
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)