mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
Fixed windows compilation
This commit is contained in:
+2
-1
@@ -86,4 +86,5 @@ code/
|
||||
!/assets/**/*custom*/**/*.bin
|
||||
# Torch hash
|
||||
torch.hash.yml
|
||||
merge/
|
||||
merge/
|
||||
.vs/
|
||||
+16
-1
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user