Windows compile fixes
This commit is contained in:
parent
bec5bd7e46
commit
5954369744
@ -9,8 +9,6 @@ target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
|
|||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
|
target_compile_options(${PROJECT_NAME} PRIVATE /W4)
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/glfw)
|
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/glm)
|
|
||||||
else()
|
else()
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
|
||||||
endif()
|
endif()
|
||||||
@ -21,13 +19,13 @@ find_package(OpenAL REQUIRED)
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(PNGLIB spng)
|
set(PNGLIB spng)
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/glfw)
|
||||||
else()
|
else()
|
||||||
find_package(PNG REQUIRED)
|
find_package(PNG REQUIRED)
|
||||||
set(PNGLIB PNG::PNG)
|
set(PNGLIB PNG::PNG)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
set(LIBS "")
|
set(LIBS "")
|
||||||
set(LIBS glm)
|
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && defined(__MINGW32__)
|
||||||
#define _WIN32_WINNT 0x0501
|
#define _WIN32_WINNT 0x0501
|
||||||
#include <mingw.thread.h>
|
#include <mingw.thread.h>
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
#ifndef VOXELS_CHUNKSLOADER_H_
|
#ifndef VOXELS_CHUNKSLOADER_H_
|
||||||
#define VOXELS_CHUNKSLOADER_H_
|
#define VOXELS_CHUNKSLOADER_H_
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && defined(__MINGW32__)
|
||||||
#define _WIN32_WINNT 0x0501
|
#define _WIN32_WINNT 0x0501
|
||||||
#include <mingw.thread.h>
|
#include <mingw.thread.h>
|
||||||
#else
|
#else
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#endif
|
#endif // _WIN32 && __MINGW32__
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "Window.h"
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
GLFWwindow* Window::window;
|
GLFWwindow* Window::window = nullptr;
|
||||||
uint Window::width = 0;
|
uint Window::width = 0;
|
||||||
uint Window::height = 0;
|
uint Window::height = 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user