CMakeLists.txt 2.67 KB
Newer Older
1 2
# Crowd Simulator Engine
# Copyright (C) 2018 - Inria Rennes - Rainbow - Julien Pettre
3
#
4 5
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
6
# as published by the Free Software Foundation; either version 3
7
# of the License, or (at your option) any later version.
8
#
9 10 11 12 13
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
14 15
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16 17
#
# Authors: Axel Lopez Gandia, Javad Amirian, Florian Berton,
18 19 20
# Julien Legros, Lucas Pelerin, Beatriz Cabrero Daniel, Fabien Grzeskowiak, 
# Alicia Nics Miquel, Alexandre Bonneau, Wouter Van toll, Benjamin Niay.
#
21 22
# Contact: crowd_group@inria.fr

23

24 25
cmake_minimum_required( VERSION 2.8 )
project( CrowdSimulator )
LOPEZ GANDIA Axel's avatar
LOPEZ GANDIA Axel committed
26
set (CMAKE_CXX_STANDARD 14)
27

Javad AMIRIAN's avatar
Javad AMIRIAN committed
28
#set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
29

30 31
#set(Boost_USE_STATIC_LIBS ON)
#find_package(Boost COMPONENTS system filesystem regex REQUIRED)
32
include_directories( ./include )
33
include_directories(./3rd-party/tinyxml/ ./3rd-party/nanoflann/)
34 35 36

link_directories( ./lib/${CMAKE_BUILD_TYPE} )

37 38
#link_directories(${Boost_LIBRARY_DIRS})
#include_directories( ${Boost_INCLUDE_DIRS} )
39

Javad AMIRIAN's avatar
Javad AMIRIAN committed
40
file( GLOB_RECURSE source_files src/* include/*)
41
file( GLOB_RECURSE 3rd_party 3rd-party/tinyxml/* 3rd-party/nanoflann/*)
42

43 44 45 46
add_executable(my_app main.cpp ${source_files} ${3rd_party})
#add_executable(test_xmlparser ./test/test_xmlparser.cpp ${source_files} ${3rd_party})
#add_executable(test_socialforces ./test/SocialForcesExample.cpp ${source_files} ${3rd_party})
#add_executable(test_ttcaDca ./test/DcaTtcaExample.cpp ${source_files} ${3rd_party})
Fabien Grzeskowiak's avatar
Fabien Grzeskowiak committed
47
#add_executable(test_localSearch ./test/TestLocalSearch.cpp ${source_files} ${3rd_party})
Javad AMIRIAN's avatar
Javad AMIRIAN committed
48

49
target_link_libraries(my_app)
50 51 52
#target_link_libraries(test_xmlparser)
#target_link_libraries(test_socialforces)
#target_link_libraries(test_ttcaDca)
Fabien Grzeskowiak's avatar
Fabien Grzeskowiak committed
53
#target_link_libraries(test_localSearch)
54
#message(${Boost_LIBRARIES})
55
#message(${Boost_LIBRARY_DIRS})
56 57 58 59 60 61 62 63 64

foreach(_source IN ITEMS ${source_files})
    get_filename_component(_source_path "${_source}" PATH)
    file(RELATIVE_PATH _source_path_rel "${CMAKE_CURRENT_SOURCE_DIR}" "${_source_path}")
	string(REPLACE "include/" "" _source_path_rel ${_source_path_rel})
	string(REPLACE "src/" "" _source_path_rel ${_source_path_rel})
    string(REPLACE "/" "\\" _group_path "${_source_path_rel}")
    source_group("${_group_path}" FILES "${_source}")
endforeach()
65
source_group("3rd-party" FILES ${3rd_party})