From a802b5cef552c2a92ae5968e020455a2673d2784 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Wed, 8 Dec 2021 17:24:29 +0100 Subject: [PATCH] fix: windows compilation --- src/TowerDefense.cpp | 2 ++ xmake.lua | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/TowerDefense.cpp b/src/TowerDefense.cpp index f292a27..2580a2e 100644 --- a/src/TowerDefense.cpp +++ b/src/TowerDefense.cpp @@ -20,8 +20,10 @@ extern "C" #endif int main(int argc, const char* args[]) { + #if !defined(NDEBUG) // setup signal handling backward::SignalHandling sh; + #endif // remove the outdated binary td::utils::Updater::removeOldFile(); diff --git a/xmake.lua b/xmake.lua index 1773dcb..458ea99 100644 --- a/xmake.lua +++ b/xmake.lua @@ -38,6 +38,9 @@ target("TowerDefense") if is_os("linux") then add_links("dw") end + if is_os("windows") then + add_links("dbghelp", "psapi", "kernel32", "msvcr90") + end add_cxflags("-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused") end