source: pacpussensors/trunk/CMakeLists.txt@ 77

Last change on this file since 77 was 76, checked in by DHERBOMEZ Gérald, 10 years ago

configuration for the pacpus TP

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)
14
15# ========================================
16# PacpusSensors version
17# ========================================
18set(PacpusSensors_MAJOR_VERSION 0)
19set(PacpusSensors_MINOR_VERSION 1)
[50]20set(PacpusSensors_PATCH_VERSION 1)
[1]21set(PacpusSensors_VERSION
22 "${PacpusSensors_MAJOR_VERSION}.${PacpusSensors_MINOR_VERSION}.${PacpusSensors_PATCH_VERSION}")
23
24# ========================================
25# Configure CMake
26# ========================================
[9]27if(NOT ${PACPUS_ROOT} STREQUAL "")
[1]28 set(CMAKE_MODULE_PATH ${PACPUS_ROOT}/cmake)
29 string (REPLACE "\\" "/" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
30 message (STATUS "setting CMAKE_MODULE_PATH to: " ${CMAKE_MODULE_PATH})
31elseif( NOT $ENV{PACPUS_ROOT} STREQUAL "")
[5]32 set(PACPUS_ROOT $ENV{PACPUS_ROOT})
[1]33 set(CMAKE_MODULE_PATH $ENV{PACPUS_ROOT}/cmake)
34 string (REPLACE "\\" "/" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
35 message (STATUS "setting CMAKE_MODULE_PATH to: " ${CMAKE_MODULE_PATH})
[5]36 message (STATUS "PACPUS_ROOT is: " ${PACPUS_ROOT})
[1]37else()
38 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")
39endif()
40
[27]41include(${CMAKE_MODULE_PATH}/PacpusUtilities.cmake)
42include(${CMAKE_MODULE_PATH}/PacpusConfiguration.cmake)
43include(${CMAKE_MODULE_PATH}/PacpusDependencies.cmake)
44include(${CMAKE_MODULE_PATH}/PacpusPlatforms.cmake)
[1]45
46# ========================================
47# Pre-configuration of the compiler
48# ========================================
49find_package(Pacpus REQUIRED)
50# Includes directories
51if(PACPUS_FOUND)
52include_directories(
53 ${PACPUS_DEPENDENCIES_INC}
54 ${PACPUS_INCLUDE_DIR}
55)
56# Compiler flags coming from PacpusDependencies and PacpusPlatforms
57add_definitions(${PACPUS_DEFINITIONS})
58endif(PACPUS_FOUND)
59
60
61# ========================================
62# Find dependencies
63# ========================================
64find_package(Qt4 REQUIRED)
65if(QT4_FOUND)
66 set(QT_USE_QTNETWORK TRUE)
67 set(QT_USE_QTOPENGL TRUE)
68 set(QT_USE_QTXML TRUE)
69 include(${QT_USE_FILE})
70 add_definitions( ${QT_DEFINITIONS} )
71 add_definitions( -DQT_PLUGIN )
72endif(QT4_FOUND)
73
[4]74include_directories(
75 ${PACPUS_DEPENDENCIES_INC}
76 ${PACPUS_INCLUDE_DIR}
77 ${PACPUS_INCLUDE_HINT}
78 ${PACPUS_INCLUDE_HINT}/Pacpus
79 ./PACPUS/include
80)
[1]81
82# ========================================
83# Build the PacpusSensors' modules
84# ========================================
[48]85# add_subdirectory(Alasca)
[76]86#add_subdirectory(CanGateway)
[72]87#add_subdirectory(PtGreyCameras)
[45]88# add_subdirectory(Dualshock)
[68]89# add_subdirectory(PacpusSocket)
[76]90#add_subdirectory(Sick)
[72]91#add_subdirectory(StereoVisionDisparity)
[60]92#add_subdirectory(SensorsApplication)
[74]93add_subdirectory(StdDbtPlayerComponents)
[48]94# add_subdirectory(Wifibot)
[76]95#add_subdirectory(Gps)
[74]96#add_subdirectory(OpencvVideo)
[61]97#add_subdirectory(SpanCPTComponent)
[76]98#add_subdirectory(NMEA0183)
99#add_subdirectory(VelodyneComponent)
[1]100# ========================================
101# Summary
102# ========================================
103pacpus_info("")
104pacpus_info("=====================================================================")
105pacpus_info("Configuration for PacpusSensors ${PacpusSensors_VERSION}")
106pacpus_info("=====================================================================")
107pacpus_info("")
108pacpus_info(" Platform:")
109pacpus_info(" Host:" ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR})
110if(CMAKE_CROSS_COMPILING)
111 pacpus_info(" Target:" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR})
112endif()
113pacpus_info(" CMake:" ${CMAKE_VERSION})
114pacpus_info(" CMake generator:" ${CMAKE_GENERATOR})
115pacpus_info(" CMake build tool:" ${CMAKE_BUILD_TOOL})
116if(MSVC)
117 pacpus_info(" MSVC:" ${MSVC_VERSION})
118else()
119 pacpus_info(" Configuration:" ${CMAKE_BUILD_TYPE})
120endif()
121pacpus_info("")
122pacpus_info(" Compiler:")
123pacpus_info(" C++ Compiler:" ${CMAKE_CXX_COMPILER})
124pacpus_info(" C++ flags (release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
125pacpus_info(" C++ flags (debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
126pacpus_info("")
127pacpus_info(" Pacpus:")
128pacpus_info(" PacpusFramework path:" ${PACPUS_ROOT})
129pacpus_info(" Log4cxx logging enabled:" ${PACPUS_USE_LOG})
130pacpus_info("")
131if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
132 message(WARNING "The source directory is the same as build directory. \"make clean\" may damage the source tree")
133endif()
Note: See TracBrowser for help on using the repository browser.