summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 1035af1a270cfac5a899b3d14ec0b086d85e4d11 (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
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 2.6)

PROJECT(synapse)




# nodig voor json_spirit?
# IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
# SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC"  )
# SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC"  )
# ENDIF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")


#uncomment this for releases or debugs
#SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_BUILD_TYPE Debug)

SET(CMAKE_COLOR_MAKEFILE ON)

#if you don't want the full compiler output, remove the following line
#SET(CMAKE_VERBOSE_MAKEFILE ON)

#add definitions, compiler switches, etc.
if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
	ADD_DEFINITIONS(-Wall -O0 -pthread -Werror -fno-strict-aliasing)
else(${CMAKE_BUILD_TYPE} STREQUAL Debug)
	ADD_DEFINITIONS(-Wall -O3 -pthread -Werror -fno-strict-aliasing)
endif(${CMAKE_BUILD_TYPE} STREQUAL Debug)

#list all source files here
file(GLOB sources *.cpp)
MESSAGE(STATUS "Detected source files: ${sources}")
ADD_EXECUTABLE(synapse ${sources})


#################### ADD BOOST STUFF HERE
INCLUDE(FindBoost)
set(Boost_USE_MULTITHREADED ON)
find_package( Boost 1.40.0 REQUIRED thread regex system filesystem)



#need to link to some other libraries ? add the to the modules CMakeList.txt, not here!
#TARGET_LINK_LIBRARIES(synapse boost_thread-mt dl boost_regex-mt boost_system-mt -pg json_spirit)
TARGET_LINK_LIBRARIES(synapse ${Boost_LIBRARIES} json_spirit dl exception)

INCLUDE_DIRECTORIES(libs libs/json_spirit ${Boost_INCLUDE_DIRS})

SUBDIRS(libs modules)