set (${PROJECT_NAME}_MAJOR_VERSION 0)
set (${PROJECT_NAME}_MINOR_VERSION 3)
-set (${PROJECT_NAME}_PATCH_LEVEL 0-dev)
+set (${PROJECT_NAME}_PATCH_LEVEL 0-dev)
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
# Make sure optimisation is always enabled
if (UNIX)
if (CMAKE_COMPILER_IS_GNUCC)
- set (CMAKE_CXX_FLAGS "-g -Wall -ffast-math -O2 -std=c++0x")
+ set (CMAKE_CXX_FLAGS "-g -Wall -ffast-math -O2 -std=c++11")
# "-Wconversion -Werror"
if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
endif (UNIX)
# Find all the source files
-file (GLOB_RECURSE folder_source
+file (GLOB_RECURSE folder_source
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
source_group (${PROJECT_NAME} FILES ${folder_source})
find_package (SDL_image REQUIRED)
find_package (OpenGL REQUIRED)
find_package (GLEW REQUIRED)
-find_package (Boost 1.37 REQUIRED
- COMPONENTS filesystem signals program_options system)
+find_package (Boost 1.37 REQUIRED
+ COMPONENTS filesystem program_options system)
find_package (Freetype REQUIRED)
if (NOT WIN32)
set (PKGNAME "${PROJECT_NAME}-${REL}")
# Installation
-install (PROGRAMS bin/${PROJECT_NAME}
+install (PROGRAMS bin/${PROJECT_NAME}
DESTINATION bin)
install (DIRECTORY data maps buildings schemas waggons engines
DESTINATION .)
-install (FILES COPYING.txt README.txt COPYRIGHT.vera
+install (FILES COPYING.txt README.txt COPYRIGHT.vera
DESTINATION .)
# Packaging
#include <map>
#include <stdexcept>
#include <sstream>
+#include <fstream>
#include <boost/filesystem.hpp>
: file_name_(file_name), mode_(mode), aborted(false)
{
if (mode == READ) {
- read_stream = shared_ptr<ifstream>(new ifstream(file_name.c_str()));
+ read_stream = shared_ptr<std::ifstream>(new std::ifstream(file_name.c_str()));
if (!read_stream->good())
throw runtime_error("Failed to open resource file " + file_name);
}
else if (mode == WRITE) {
const string tmp = tmp_file_name();
- write_stream = shared_ptr<ofstream>(new ofstream(tmp.c_str()));
+ write_stream = shared_ptr<std::ofstream>(new std::ofstream(tmp.c_str()));
if (!write_stream->good())
throw runtime_error("Failed to open resource file " + file_name);