aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlec Thomas <alec@swapoff.org>2012-10-18 12:54:12 -0400
committerAlec Thomas <alec@swapoff.org>2012-10-18 12:54:12 -0400
commitd6c7bd8997458658dc4853c36c982acd92966875 (patch)
tree22c36a558247f20c0ddc1a169012b68ebdf0eee0 /CMakeLists.txt
parentd98de9aeb12ff50d49b833439bd78402e85d1991 (diff)
More attempts to get cmake build working.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..bb94909
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,41 @@
+cmake_minimum_required(VERSION 2.8)
+project(EntityX)
+include_directories(.)
+enable_testing()
+find_package(GTest REQUIRED)
+set(Boost_USE_STATIC_LIBS OFF)
+set(Boost_USE_MULTITHREADED ON)
+set(Boost_USE_STATIC_RUNTIME OFF)
+#find_package(Boost REQUIRED COMPONENTS)
+find_package(Boost 1.36.0 REQUIRED COMPONENTS signals)
+
+include_directories(
+ ${Boost_INCLUDE_DIR}
+ ${GTest_INCLUDE_DIR}
+ )
+add_definitions(
+ -ansi -pedantic -Werror -Wall -Wextra -Wno-unused-parameter -Wno-error=unused-variable -std=c++11
+ )
+add_executable(
+ entityx_test
+ entityx/Components_test.cc
+ entityx/Entity_test.cc
+ entityx/Event_test.cc
+ entityx/System_test.cc
+ )
+target_link_libraries(
+ entityx_test
+ entityx
+ glog
+ ${Boost_LIBRARIES}
+ ${GTEST_BOTH_LIBRARIES}
+ )
+add_test(AllTestsInentityx_test entityx_test)
+add_library(
+ entityx
+ entityx/Components.cc
+ entityx/System.cc
+ entityx/Event.cc
+ entityx/Entity.cc
+ entityx/World.cc
+ )