Merge pull request #35 from pchaos/master

支持fedora
This commit is contained in:
pchaos 2020-09-28 17:24:43 +08:00 committed by GitHub
commit 2a280e173f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -44,6 +44,7 @@ target("hikyuu")
add_includedirs("/usr/include/hdf5")
add_includedirs("/usr/include/hdf5/serial")
if is_arch("x86_64") then
add_linkdirs("/usr/lib64/mysql")
add_linkdirs("/usr/lib/x86_64-linux-gnu")
add_linkdirs("/usr/lib/x86_64-linux-gnu/hdf5/serial")
end
@ -79,7 +80,7 @@ target("hikyuu")
assert(os.getenv("BOOST_ROOT"), [[Missing environment variable: BOOST_ROOT
You need to specify where the boost headers is via the BOOST_ROOT variable!]])
assert(os.getenv("BOOST_ROOT"), [[Missing environment variable: BOOST_LIB
assert(os.getenv("BOOST_LIB"), [[Missing environment variable: BOOST_LIB
You need to specify where the boost library is via the BOOST_LIB variable!]])
end)

View File

@ -113,7 +113,7 @@ target("core")
os.cp(target:targetdir() .. '/hikyuu.dylib', dst_dir)
else
os.cp(target:targetdir() .. '/core.so', dst_dir)
os.cp(target:targetdir() .. '/hikyuu.so', dst_dir)
os.cp(target:targetdir() .. '/libhikyuu.so', dst_dir)
end
os.cp("$(env BOOST_LIB)/boost_date_time*.dll", dst_dir)

View File

@ -35,8 +35,9 @@ set_languages("cxx17", "C99")
add_plugindirs("./xmake_plugins")
add_requires("fmt", {configs = {system=false, header_only = true, vs_runtime = "MD"}})
add_requires("spdlog", {configs = {system=false, header_only = true, fmt_external=true, vs_runtime = "MD"}})
add_requires("fmt", {system=false, configs = {header_only = true, vs_runtime = "MD"}})
add_requires("spdlog", {configs = {header_only = true, fmt_external=true, vs_runtime = "MD"}})
add_defines("SPDLOG_DISABLE_DEFAULT_LOGGER") -- 禁用 spdlog 默认 logger
set_objectdir("$(buildir)/$(mode)/$(plat)/$(arch)/.objs")
@ -49,6 +50,7 @@ add_defines("BOOST_ALL_DYN_LINK")
if is_host("linux") then
if is_arch("x86_64") then
add_linkdirs("/usr/lib64")
add_linkdirs("/usr/lib/x86_64-linux-gnu")
end
end