From 83107d413d8ad66ac8c61985aa37ccb4adf85c46 Mon Sep 17 00:00:00 2001 From: Jett <55758076+Jettford@users.noreply.github.com> Date: Sat, 1 Jan 2022 09:38:45 +0000 Subject: [PATCH] More windows fixes (#329) - Added World, Chat and Auth servers as deps to Master - Added "windows-default" CMake preset so that CMake didn't error out on Windows - Added NOMINMAX define above cpplinq include --- CMakeLists.txt | 6 ++++++ CMakePresets.json | 14 ++++++++++++++ dDatabase/Tables/CDTable.h | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe1f2751..a8395c8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -487,3 +487,9 @@ if(UNIX) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC") endif(UNIX) + +if(WIN32) +add_dependencies(MasterServer WorldServer) +add_dependencies(MasterServer AuthServer) +add_dependencies(MasterServer ChatServer) +endif() \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json index c892287a..8b25452f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -12,6 +12,20 @@ "description": "Sets build and install directories", "binaryDir": "${sourceDir}/build", "generator": "Unix Makefiles" + }, + { + "name": "windows-default", + "displayName": "Windows only Configure Settings", + "description": "Sets build and install directories", + "binaryDir": "${sourceDir}/build", + "generator": "Ninja", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } } ], "buildPresets": [ diff --git a/dDatabase/Tables/CDTable.h b/dDatabase/Tables/CDTable.h index c7c64377..ec056e8e 100644 --- a/dDatabase/Tables/CDTable.h +++ b/dDatabase/Tables/CDTable.h @@ -10,6 +10,10 @@ #include // CPPLinq +#ifdef _WIN32 +#define NOMINMAX +// windows.h has min and max macros that breaks cpplinq +#endif #include "cpplinq.hpp" #pragma warning (disable : 4244) //Disable double to float conversion warnings