source: pacpussensors/trunk/CMakeLists.txt@ 137

Last change on this file since 137 was 130, checked in by DHERBOMEZ Gérald, 8 years ago

up

File size: 5.5 KB
RevLine 
[1]1######################################################################################################
2# #
3# __________ _________ #
4# \______ \_____ ____ ______ __ __ ______/ _____/ ____ ____ _________________ ______ #
5# | ___/\__ \ _/ ___\\____ \| | \/ ___/\_____ \_/ __ \ / \ / ___/ _ \_ __ \/ ___/ #
6# | | / __ \\ \___| |_> > | /\___ \ / \ ___/| | \\___ ( <_> ) | \/\___ \ #
7# |____| (____ /\___ > __/|____//____ >_______ /\___ >___| /____ >____/|__| /____ > #
8# \/ \/|__| \/ \/ \/ \/ \/ \/ #
9# #
10######################################################################################################
11
12project(PacpusSensors)
13cmake_minimum_required(VERSION 2.8)
[99]14if(UNIX)
15 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -fpermissive") #c++11
16endif()
[1]17
18# ========================================
19# PacpusSensors version
20# ========================================
21set(PacpusSensors_MAJOR_VERSION 0)
22set(PacpusSensors_MINOR_VERSION 1)
[50]23set(PacpusSensors_PATCH_VERSION 1)
[1]24set(PacpusSensors_VERSION
25 "${PacpusSensors_MAJOR_VERSION}.${PacpusSensors_MINOR_VERSION}.${PacpusSensors_PATCH_VERSION}")
26
27# ========================================
28# Configure CMake
29# ========================================
[9]30if(NOT ${PACPUS_ROOT} STREQUAL "")
[1]31 set(CMAKE_MODULE_PATH ${PACPUS_ROOT}/cmake)
32 string (REPLACE "\\" "/" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
33 message (STATUS "setting CMAKE_MODULE_PATH to: " ${CMAKE_MODULE_PATH})
34elseif( NOT $ENV{PACPUS_ROOT} STREQUAL "")
[5]35 set(PACPUS_ROOT $ENV{PACPUS_ROOT})
[1]36 set(CMAKE_MODULE_PATH $ENV{PACPUS_ROOT}/cmake)
37 string (REPLACE "\\" "/" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
38 message (STATUS "setting CMAKE_MODULE_PATH to: " ${CMAKE_MODULE_PATH})
[5]39 message (STATUS "PACPUS_ROOT is: " ${PACPUS_ROOT})
[1]40else()
41 message (FATAL_ERROR "Environment variable PACPUS_ROOT not set, please define it in your operating system or pass it as argument to the cmake command")
42endif()
43
[27]44include(${CMAKE_MODULE_PATH}/PacpusUtilities.cmake)
45include(${CMAKE_MODULE_PATH}/PacpusConfiguration.cmake)
46include(${CMAKE_MODULE_PATH}/PacpusDependencies.cmake)
47include(${CMAKE_MODULE_PATH}/PacpusPlatforms.cmake)
[1]48
49# ========================================
50# Pre-configuration of the compiler
51# ========================================
52find_package(Pacpus REQUIRED)
53# Includes directories
54if(PACPUS_FOUND)
55include_directories(
56 ${PACPUS_DEPENDENCIES_INC}
57 ${PACPUS_INCLUDE_DIR}
58)
59# Compiler flags coming from PacpusDependencies and PacpusPlatforms
60add_definitions(${PACPUS_DEFINITIONS})
61endif(PACPUS_FOUND)
62
63
64# ========================================
[99]65# Build the ProjectExercise' modules
[1]66# ========================================
[99]67#
68# In the following list add the plugin you want to build.
69# Paths are relative to the root of the project.
70#
[1]71
[128]72#add_subdirectory(Alasca)
[130]73add_subdirectory(CanGateway) #require kvaser libcan
[105]74#add_subdirectory(PtGreyCameras)
[99]75#add_subdirectory(Dualshock)
[128]76#add_subdirectory(NMEA0183)
77#add_subdirectory(Gps) #require NMEA0183
78#add_subdirectory(SpanCPTComponent) #require NMEA0183
79#add_subdirectory(Sick)
80#add_subdirectory(PacpusSocket)
[130]81add_subdirectory(OpencvVideo)
[99]82#add_subdirectory(Wifibot) #depends on PacpusSocket, change PacpusSocket to PacpusUdpSocket
83#add_subdirectory(Ladybug) #require Ladybug spherical camera's driver, not compiled yet
[128]84#add_subdirectory(StdDbtPlayerComponents)
[99]85#add_subdirectory(TelnetClient)
[128]86#add_subdirectory(VelodyneComponent)
[130]87#add_subdirectory(Vislab)
[81]88
[1]89# ========================================
90# Summary
91# ========================================
92pacpus_info("")
93pacpus_info("=====================================================================")
94pacpus_info("Configuration for PacpusSensors ${PacpusSensors_VERSION}")
95pacpus_info("=====================================================================")
96pacpus_info("")
97pacpus_info(" Platform:")
98pacpus_info(" Host:" ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR})
99if(CMAKE_CROSS_COMPILING)
100 pacpus_info(" Target:" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR})
101endif()
102pacpus_info(" CMake:" ${CMAKE_VERSION})
103pacpus_info(" CMake generator:" ${CMAKE_GENERATOR})
104pacpus_info(" CMake build tool:" ${CMAKE_BUILD_TOOL})
105if(MSVC)
106 pacpus_info(" MSVC:" ${MSVC_VERSION})
107else()
108 pacpus_info(" Configuration:" ${CMAKE_BUILD_TYPE})
109endif()
110pacpus_info("")
111pacpus_info(" Compiler:")
112pacpus_info(" C++ Compiler:" ${CMAKE_CXX_COMPILER})
113pacpus_info(" C++ flags (release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
114pacpus_info(" C++ flags (debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
115pacpus_info("")
116pacpus_info(" Pacpus:")
117pacpus_info(" PacpusFramework path:" ${PACPUS_ROOT})
118pacpus_info(" Log4cxx logging enabled:" ${PACPUS_USE_LOG})
119pacpus_info("")
120if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
121 message(WARNING "The source directory is the same as build directory. \"make clean\" may damage the source tree")
122endif()
[94]123
Note: See TracBrowser for help on using the repository browser.