Commit 7e3f8e67 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter
Browse files

Cleaned up the CMake file.

parent 05ab8c83
...@@ -16,33 +16,27 @@ ...@@ -16,33 +16,27 @@
# #
# Authors: Axel Lopez Gandia, Javad Amirian, Florian Berton, # Authors: Axel Lopez Gandia, Javad Amirian, Florian Berton,
# Julien Legros, Lucas Pelerin, Beatriz Cabrero Daniel, Fabien Grzeskowiak, # Julien Legros, Lucas Pelerin, Beatriz Cabrero Daniel, Fabien Grzeskowiak,
# Alicia Nics Miquel, Alexandre Bonneau, Wouter Van toll, Benjamin Niay. # Alicia Nicás Miquel, Alexandre Bonneau, Wouter Van toll, Benjamin Niay.
# #
# Contact: crowd_group@inria.fr # Contact: crowd_group@inria.fr
cmake_minimum_required( VERSION 2.8 ) cmake_minimum_required( VERSION 2.8 )
project( CrowdSimulator ) project( CrowdSimulator )
set (CMAKE_CXX_STANDARD 14) set (CMAKE_CXX_STANDARD 14)
#set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE}) #set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
# === include 3rd-party code # === Include 3rd-party code
#set(Boost_USE_STATIC_LIBS ON)
#find_package(Boost COMPONENTS system filesystem regex REQUIRED)
include_directories( ./include ) include_directories( ./include )
include_directories(./3rd-party/tinyxml/ ./3rd-party/nanoflann/) include_directories(./3rd-party/tinyxml/ ./3rd-party/nanoflann/)
link_directories( ./lib/${CMAKE_BUILD_TYPE} ) #link_directories( ./lib/${CMAKE_BUILD_TYPE} )
#link_directories(${Boost_LIBRARY_DIRS})
#include_directories( ${Boost_INCLUDE_DIRS} )
file( GLOB_RECURSE source_files src/* include/*) file( GLOB_RECURSE source_files src/* include/*)
file( GLOB_RECURSE 3rd_party 3rd-party/tinyxml/* 3rd-party/nanoflann/*) file( GLOB_RECURSE 3rd_party 3rd-party/tinyxml/* 3rd-party/nanoflann/*)
# === use multithreading? # === Use multithreading?
option(OCSR_USE_MULTITHREADING "Allow the program to use multiple parallel threads" ON) option(OCSR_USE_MULTITHREADING "Allow the program to use multiple parallel threads" ON)
if (OCSR_USE_MULTITHREADING) if (OCSR_USE_MULTITHREADING)
...@@ -51,10 +45,10 @@ if (OCSR_USE_MULTITHREADING) ...@@ -51,10 +45,10 @@ if (OCSR_USE_MULTITHREADING)
endif (MSVC) endif (MSVC)
endif(OCSR_USE_MULTITHREADING) endif(OCSR_USE_MULTITHREADING)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # === Linux compatibility compiler option
else()
#linux compatibility compiler option if (NOT MSVC)
add_definitions(-fPIC) add_definitions(-fPIC)
endif() endif()
# === Engine project: a static library that performs the simulation # === Engine project: a static library that performs the simulation
...@@ -63,13 +57,13 @@ add_library(Engine STATIC ${source_files} ${3rd_party}) ...@@ -63,13 +57,13 @@ add_library(Engine STATIC ${source_files} ${3rd_party})
# === Console application # === Console application
IF (WIN32) if (WIN32)
add_executable(OCSR_ConsoleApplication_windows main.cpp) add_executable(OCSR_ConsoleApplication_Windows main.cpp)
target_link_libraries(OCSR_ConsoleApplication_windows Engine) target_link_libraries(OCSR_ConsoleApplication_Windows Engine)
ELSE() else()
add_executable(OCSR_ConsoleApplication_linux main.cpp) add_executable(OCSR_ConsoleApplication_Linux main.cpp)
target_link_libraries(OCSR_ConsoleApplication_linux Engine) target_link_libraries(OCSR_ConsoleApplication_Linux Engine)
ENDIF() endif()
# === Dynamic library (e.g. a DLL on Windows) to include into other programs # === Dynamic library (e.g. a DLL on Windows) to include into other programs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment