Fixed windows compilation

This commit is contained in:
KiritoDv
2024-06-01 21:03:49 -06:00
parent f761e0b643
commit 6f927365ca
3 changed files with 21 additions and 2 deletions
+2 -1
View File
@@ -86,4 +86,5 @@ code/
!/assets/**/*custom*/**/*.bin
# Torch hash
torch.hash.yml
merge/
merge/
.vs/
+16 -1
View File
@@ -38,7 +38,7 @@ if(NOT CMAKE_BUILD_TYPE )
endif()
vcpkg_bootstrap()
vcpkg_install_packages(fontconfig sdl2 zlib bzip2 libzip libpng getopt dirent libusb pthread glew glfw3)
vcpkg_install_packages(fontconfig sdl2 zlib bzip2 libzip libpng getopt dirent libusb pthread glew glfw3 nlohmann-json tinyxml2 spdlog)
endif()
if (MSVC)
@@ -47,6 +47,21 @@ else()
set(CPP "${CMAKE_C_COMPILER}" "-E" "-P" "-Wno-trigraphs" "-x" "c")
endif()
################################################################################
# Set target arch type if empty. Visual studio solution generator provides it.
################################################################################
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(NOT CMAKE_VS_PLATFORM_NAME)
set(CMAKE_VS_PLATFORM_NAME "x64")
endif()
message("${CMAKE_VS_PLATFORM_NAME} architecture in use")
if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64"
OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32"))
message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!")
endif()
endif()
# Set game compilation version
set(VERSION us)
set(USE_NETWORKING OFF)
+3
View File
@@ -13,7 +13,10 @@
#include "port/Enhancements/mods.h"
#include <Fast3D/gfx_pc.h>
#include <Fast3D/gfx_rendering_api.h>
#ifdef USE_NETWORKING
#include <SDL2/SDL_net.h>
#endif
#include <utility>