]> git.seodisparate.com - EntityComponentMetaSystem/commitdiff
Init commit
authorStephen Seo <seo.disparate@gmail.com>
Wed, 24 Feb 2016 10:35:55 +0000 (19:35 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 24 Feb 2016 10:35:55 +0000 (19:35 +0900)
.gitignore [new file with mode: 0644]
src/CMakeLists.txt [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..d3e1308
--- /dev/null
@@ -0,0 +1,4 @@
+build*/
+*.o
+*.swp
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..fe14084
--- /dev/null
@@ -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)
+
+