hikyuu2/hikyuu_pywrap/xmake.lua

91 lines
2.3 KiB
Lua
Raw Normal View History

2018-09-20 02:43:03 +08:00
option("boost-python-suffix")
2018-09-09 16:43:04 +08:00
set_default("3X")
set_showmenu(true)
set_category("hikyuu")
set_description("Set suffix of libboost_python. ",
"Boost.python 1.67 later use 3x like libboost_python35, ",
"but older is libboost_python3",
" - 3X autocheck for 35, 36, 37, 3x")
option_end()
2019-06-04 23:13:32 +08:00
add_includedirs("../hikyuu_cpp")
if is_plat("windows") then
add_defines("HKU_API=__declspec(dllimport)")
end
2018-09-15 02:52:35 +08:00
local cc = get_config("cc")
local cxx = get_config("cxx")
if (cc and string.find(cc, "clang")) or (cxx and string.find(cxx, "clang")) then
2019-08-17 15:22:55 +08:00
add_cxflags("-Wno-error=parentheses-equality -Wno-error=missing-braces")
2018-09-15 02:52:35 +08:00
end
on_load("xmake_on_load")
target("_hikyuu")
set_kind("shared")
add_packages("fmt", "spdlog")
2018-09-09 16:43:04 +08:00
add_deps("hikyuu")
if is_plat("windows") then
set_filename("_hikyuu.pyd")
2018-09-21 01:08:43 +08:00
else
set_filename("_hikyuu.so")
end
add_files("./*.cpp")
2018-09-09 16:43:04 +08:00
target("_indicator")
set_kind("shared")
add_packages("fmt", "spdlog")
2018-09-09 16:43:04 +08:00
add_deps("hikyuu")
if is_plat("windows") then
set_filename("_indicator.pyd")
2018-09-21 01:08:43 +08:00
else
set_filename("_indicator.so")
end
add_files("./indicator/*.cpp")
target("_trade_manage")
set_kind("shared")
add_packages("fmt", "spdlog")
2018-09-09 16:43:04 +08:00
add_deps("hikyuu")
if is_plat("windows") then
set_filename("_trade_manage.pyd")
2018-09-21 01:08:43 +08:00
else
set_filename("_trade_manage.so")
end
add_files("./trade_manage/*.cpp")
target("_trade_sys")
set_kind("shared")
add_packages("fmt", "spdlog")
2018-09-09 16:43:04 +08:00
add_deps("hikyuu")
if is_plat("windows") then
set_filename("_trade_sys.pyd")
2018-09-21 01:08:43 +08:00
else
set_filename("_trade_sys.so")
end
add_files("./trade_sys/*.cpp")
target("_trade_instance")
set_kind("shared")
add_packages("fmt", "spdlog")
2018-09-09 16:43:04 +08:00
add_deps("hikyuu")
if is_plat("windows") then
set_filename("_trade_instance.pyd")
2018-09-21 01:08:43 +08:00
else
set_filename("_trade_instance.so")
end
add_files("./trade_instance/*.cpp")
target("_data_driver")
set_kind("shared")
add_packages("fmt", "spdlog")
2018-09-09 16:43:04 +08:00
add_deps("hikyuu")
if is_plat("windows") then
set_filename("_data_driver.pyd")
2018-09-21 01:08:43 +08:00
else
set_filename("_data_driver.so")
end
add_files("./data_driver/*.cpp")
2018-09-09 16:43:04 +08:00