Просмотр исходного кода

[commonlibsse-ng] Edit `spdlog` dependency (#1854)

* [commonlibsse-ng] Edit `spdlog` dep

* [commonlibsse-ng] Fix for old msvc issue
Qudix 2 лет назад
Родитель
Сommit
0ad81951a7
2 измененных файлов с 5 добавлено и 2 удалено
  1. 3 1
      packages/c/commonlibsse-ng/port/xmake.lua
  2. 2 1
      packages/c/commonlibsse-ng/xmake.lua

+ 3 - 1
packages/c/commonlibsse-ng/port/xmake.lua

@@ -42,7 +42,8 @@ option("skse_xbyak")
 option_end()
 
 -- add packages
-add_requires("fmt", "spdlog", "rapidcsv")
+add_requires("fmt", "rapidcsv")
+add_requires("spdlog", { configs = { header_only = false } })
 
 if has_config("skse_xbyak") then
     add_requires("xbyak")
@@ -113,6 +114,7 @@ target("CommonLibSSE")
             target:add("cxxflags", "/wd5027") -- 'type': move assignment operator was implicitly defined as deleted
             target:add("cxxflags", "/wd5045") -- compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
             target:add("cxxflags", "/wd5053") -- support for 'explicit(<expr>)' in C++17 and earlier is a vendor extension
+            target:add("cxxflags", "/wd5105") -- macro expansion producing 'defined' has undefined behavior (workaround for older msvc bug)
             target:add("cxxflags", "/wd5204") -- 'type-name': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly
             target:add("cxxflags", "/wd5220") -- 'member': a non-static data member with a volatile qualified type no longer implies that compiler generated copy / move constructors and copy / move assignment operators are not trivial
         else

+ 2 - 1
packages/c/commonlibsse-ng/xmake.lua

@@ -14,7 +14,8 @@ package("commonlibsse-ng")
     add_configs("skyrim_vr", {description = "Enable runtime support for Skyrim VR", default = true, type = "boolean"})
     add_configs("skse_xbyak", {description = "Enable trampoline support for Xbyak", default = false, type = "boolean"})
 
-    add_deps("fmt", "rapidcsv", "spdlog")
+    add_deps("fmt", "rapidcsv")
+    add_deps("spdlog", { configs = { header_only = false } })
 
     add_syslinks("version", "user32", "shell32", "ole32", "advapi32")