mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
fix stdafx cotire
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake_modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake_modules/")
|
||||||
#include(PrecompiledHeader)
|
|
||||||
include(cotire)
|
include(cotire)
|
||||||
set(DEPS_DIR ${DEPS_DIR} "${CMAKE_SOURCE_DIR}/ref")
|
set(DEPS_DIR ${DEPS_DIR} "${CMAKE_SOURCE_DIR}/ref")
|
||||||
project("eu07")
|
project("eu07")
|
||||||
@@ -165,11 +164,6 @@ endif()
|
|||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
|
||||||
cotire(${PROJECT_NAME})
|
|
||||||
#add_precompiled_header(${PROJECT_NAME} stdafx.h FORCEINCLUDE SOURCE_CXX stdafx.cpp)
|
|
||||||
|
|
||||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
|
||||||
# /wd4996: disable "deprecation" warnings
|
# /wd4996: disable "deprecation" warnings
|
||||||
# /wd4244: disable warnings for conversion with possible loss of data
|
# /wd4244: disable warnings for conversion with possible loss of data
|
||||||
@@ -198,8 +192,7 @@ include_directories(${OPENGL_INCLUDE_DIR})
|
|||||||
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES})
|
||||||
|
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
include_directories(${GLEW_INCLUDE_DIRS})
|
target_link_libraries(${PROJECT_NAME} GLEW::GLEW)
|
||||||
target_link_libraries(${PROJECT_NAME} ${GLEW_LIBRARIES})
|
|
||||||
|
|
||||||
find_package(GLFW3 REQUIRED)
|
find_package(GLFW3 REQUIRED)
|
||||||
include_directories(${GLFW3_INCLUDE_DIR})
|
include_directories(${GLFW3_INCLUDE_DIR})
|
||||||
@@ -239,3 +232,7 @@ endif()
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(${PROJECT_NAME} ws2_32)
|
target_link_libraries(${PROJECT_NAME} ws2_32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
||||||
|
cotire(${PROJECT_NAME})
|
||||||
|
|||||||
@@ -154,7 +154,8 @@ void python_taskqueue::exit() {
|
|||||||
m_condition.notify_all();
|
m_condition.notify_all();
|
||||||
// let them free up their shit before we proceed
|
// let them free up their shit before we proceed
|
||||||
for( auto &worker : m_workers ) {
|
for( auto &worker : m_workers ) {
|
||||||
worker.join();
|
if (worker.joinable())
|
||||||
|
worker.join();
|
||||||
}
|
}
|
||||||
// get rid of the leftover tasks
|
// get rid of the leftover tasks
|
||||||
// with the workers dead we don't have to worry about concurrent access anymore
|
// with the workers dead we don't have to worry about concurrent access anymore
|
||||||
|
|||||||
7
stdafx.h
7
stdafx.h
@@ -81,12 +81,7 @@
|
|||||||
#define GLFW_DLL
|
#define GLFW_DLL
|
||||||
#endif // _windows
|
#endif // _windows
|
||||||
#endif // build_static
|
#endif // build_static
|
||||||
#ifndef __ANDROID__
|
#include <GL/glew.h>
|
||||||
#include "GL/glew.h"
|
|
||||||
#else
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glu.h>
|
|
||||||
#endif
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "GL/wglew.h"
|
#include "GL/wglew.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user