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
This commit is contained in:
Jett 2022-01-01 09:38:45 +00:00 committed by GitHub
parent a15f9f38d8
commit 83107d413d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -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()

View File

@ -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": [

View File

@ -10,6 +10,10 @@
#include <map>
// 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