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 @@
#
# Authors: Axel Lopez Gandia, Javad Amirian, Florian Berton,
# 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
cmake_minimum_required( VERSION 2.8 )
project( CrowdSimulator )
set (CMAKE_CXX_STANDARD 14)
#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(./3rd-party/tinyxml/ ./3rd-party/nanoflann/)
link_directories( ./lib/${CMAKE_BUILD_TYPE} )
#link_directories(${Boost_LIBRARY_DIRS})
#include_directories( ${Boost_INCLUDE_DIRS} )
#link_directories( ./lib/${CMAKE_BUILD_TYPE} )
file( GLOB_RECURSE source_files src/* include/*)
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)
if (OCSR_USE_MULTITHREADING)
......@@ -51,10 +45,10 @@ if (OCSR_USE_MULTITHREADING)
endif (MSVC)
endif(OCSR_USE_MULTITHREADING)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
else()
#linux compatibility compiler option
add_definitions(-fPIC)
# === Linux compatibility compiler option
if (NOT MSVC)
add_definitions(-fPIC)
endif()
# === Engine project: a static library that performs the simulation
......@@ -63,13 +57,13 @@ add_library(Engine STATIC ${source_files} ${3rd_party})
# === Console application
IF (WIN32)
add_executable(OCSR_ConsoleApplication_windows main.cpp)
target_link_libraries(OCSR_ConsoleApplication_windows Engine)
ELSE()
add_executable(OCSR_ConsoleApplication_linux main.cpp)
target_link_libraries(OCSR_ConsoleApplication_linux Engine)
ENDIF()
if (WIN32)
add_executable(OCSR_ConsoleApplication_Windows main.cpp)
target_link_libraries(OCSR_ConsoleApplication_Windows Engine)
else()
add_executable(OCSR_ConsoleApplication_Linux main.cpp)
target_link_libraries(OCSR_ConsoleApplication_Linux Engine)
endif()
# === 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