Commit 6d7f520b authored by Michael Ochmann's avatar Michael Ochmann
Browse files

Merge branch 'develop' of gitlab.fsi.hochschule-trier.de:GameDevWeek/gdw_ss15_cpp into develop

parents 9ce85529 14331e59
cmake_minimum_required(VERSION 3.1)
project(gdw_ss15_cpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
#use clang instead of g++
set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -stdlib=libc++")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -pedantic")
#define symbols for debug build
if (CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DDEBUG)
if (NOT WIN32)
add_definitions(-DSTACKTRACE)
endif ()
endif ()
#define symbols for project
add_definitions(-DGLM_SWIZZLE)
add_definitions(-DGLEW_STATIC)
find_package(OpenGL)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/lib"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/gli/gli"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glm/glm"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2/include"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/gli"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/glm"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2/include"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl2_mixer/x86_64-w64-mingw32/include/SDL2"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
FILE(GLOB_RECURSE clion_all_headers
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/include/*.h
${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp
${CMAKE_CURRENT_SOURCE_DIR}/*.inl
)
FILE (GLOB_RECURSE clion_all_headers
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/*.h
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
${CMAKE_CURRENT_SOURCE_DIR}/*.inl
#glew library
add_library(glew_static STATIC IMPORTED)
set_target_properties(glew_static PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/glew/build/libGLEW.a
)
set(LINKED_LIBRARIES
SDL2
SDL2main
SDL2_mixer
GL
c++
c++abi
)
add_executable(Game ${clion_all_headers})
\ No newline at end of file
add_executable(Game ${clion_all_headers})
target_link_libraries(Game ${LINKED_LIBRARIES} glew_static)
file(COPY assets DESTINATION .)
\ No newline at end of file
......@@ -9,6 +9,7 @@ namespace gdw {
loaders_.emplace_back(make_unique<native_asset_loader>(""));
loaders_.emplace_back(make_unique<native_asset_loader>("assets/"));
loaders_.emplace_back(make_unique<native_asset_loader>("../assets/"));
loaders_.emplace_back(make_unique<native_asset_loader>("../../assets/"));
}
std::string asset_manager::native_name(const std::string& name) const {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment