Init commit
This commit is contained in:
commit
0b39f8bc93
2 changed files with 43 additions and 0 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
build*/
|
||||||
|
*.o
|
||||||
|
*.swp
|
||||||
|
|
39
src/CMakeLists.txt
Normal file
39
src/CMakeLists.txt
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
project(EntityComponentSystem)
|
||||||
|
|
||||||
|
set(EntityComponentSystem_SOURCES
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(EntityComponentSystem
|
||||||
|
${EntityComponentSystem_SOURCES})
|
||||||
|
|
||||||
|
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -Wextra")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -D NDEBUG")
|
||||||
|
|
||||||
|
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
||||||
|
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
||||||
|
if(NOT (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0))
|
||||||
|
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.0 or greater.")
|
||||||
|
endif ()
|
||||||
|
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
|
elseif(MSVC)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Your C++ compiler does not support C++14.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
|
message(STATUS "Setting build type to 'Debug', none was specified.")
|
||||||
|
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
|
||||||
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
install(TARGETS EntityComponentSystem DESTINATION lib)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue