aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: bb94909f95496ff1c9b325416bfeb14bcbe6f76c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
    )