source: pacpussensors/trunk/CMakeLists.txt@ 121

Last change on this file since 121 was 110, checked in by DHERBOMEZ Gérald, 9 years ago
  • minor modifications about dllexport and dllimport macros usages
File size: 5.4 KB
Line 
1######################################################################################################
2# #
3# __________ _________ #
4# \______ \_____ ____ ______ __ __ ______/ _____/ ____ ____ _________________ ______ #
5# | ___/\__ \ _/ ___\\____ \| | \/ ___/\_____ \_/ __ \ / \ / ___/ _ \_ __ \/ ___/ #
6# | | / __ \\ \___| |_> > | /\___ \ / \ ___/| | \\___ ( <_> ) | \/\___ \ #
7# |____| (____ /\___ > __/|____//____ >_______ /\___ >___| /____ >____/|__| /____ > #
8# \/ \/|__| \/ \/ \/ \/ \/ \/ #
9# #
10######################################################################################################
11
12project(PacpusSensors)
13cmake_minimum_required(VERSION 2.8)
14if(UNIX)
15 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -fpermissive") #c++11
16endif()
17
18# ========================================
19# PacpusSensors version
20# ========================================
21set(PacpusSensors_MAJOR_VERSION 0)
22set(PacpusSensors_MINOR_VERSION 1)
23set(PacpusSensors_PATCH_VERSION 1)
24set(PacpusSensors_VERSION
25 "${PacpusSensors_MAJOR_VERSION}.${PacpusSensors_MINOR_VERSION}.${PacpusSensors_PATCH_VERSION}")
26
27# ========================================
28# Configure CMake
29# ========================================
30if(NOT ${PACPUS_ROOT} STREQUAL "")
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 "")
35 set(PACPUS_ROOT $ENV{PACPUS_ROOT})
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})
39 message (STATUS "PACPUS_ROOT is: " ${PACPUS_ROOT})
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
44include(${CMAKE_MODULE_PATH}/PacpusUtilities.cmake)
45include(${CMAKE_MODULE_PATH}/PacpusConfiguration.cmake)
46include(${CMAKE_MODULE_PATH}/PacpusDependencies.cmake)
47include(${CMAKE_MODULE_PATH}/PacpusPlatforms.cmake)
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# ========================================
65# Build the ProjectExercise' modules
66# ========================================
67#
68# In the following list add the plugin you want to build.
69# Paths are relative to the root of the project.
70#
71
72add_subdirectory(Alasca)
73add_subdirectory(CanGateway) #require kvaser libcan
74#add_subdirectory(PtGreyCameras)
75#add_subdirectory(Dualshock)
76add_subdirectory(NMEA0183)
77add_subdirectory(Gps) #require NMEA0183
78add_subdirectory(SpanCPTComponent) #require NMEA0183
79add_subdirectory(Sick)
80add_subdirectory(PacpusSocket)
81#add_subdirectory(OpencvVideo)
82#add_subdirectory(Wifibot) #depends on PacpusSocket, change PacpusSocket to PacpusUdpSocket
83#add_subdirectory(Ladybug) #require Ladybug spherical camera's driver, not compiled yet
84add_subdirectory(StdDbtPlayerComponents)
85#add_subdirectory(TelnetClient)
86add_subdirectory(VelodyneComponent)
87
88# ========================================
89# Summary
90# ========================================
91pacpus_info("")
92pacpus_info("=====================================================================")
93pacpus_info("Configuration for PacpusSensors ${PacpusSensors_VERSION}")
94pacpus_info("=====================================================================")
95pacpus_info("")
96pacpus_info(" Platform:")
97pacpus_info(" Host:" ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR})
98if(CMAKE_CROSS_COMPILING)
99 pacpus_info(" Target:" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR})
100endif()
101pacpus_info(" CMake:" ${CMAKE_VERSION})
102pacpus_info(" CMake generator:" ${CMAKE_GENERATOR})
103pacpus_info(" CMake build tool:" ${CMAKE_BUILD_TOOL})
104if(MSVC)
105 pacpus_info(" MSVC:" ${MSVC_VERSION})
106else()
107 pacpus_info(" Configuration:" ${CMAKE_BUILD_TYPE})
108endif()
109pacpus_info("")
110pacpus_info(" Compiler:")
111pacpus_info(" C++ Compiler:" ${CMAKE_CXX_COMPILER})
112pacpus_info(" C++ flags (release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
113pacpus_info(" C++ flags (debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
114pacpus_info("")
115pacpus_info(" Pacpus:")
116pacpus_info(" PacpusFramework path:" ${PACPUS_ROOT})
117pacpus_info(" Log4cxx logging enabled:" ${PACPUS_USE_LOG})
118pacpus_info("")
119if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
120 message(WARNING "The source directory is the same as build directory. \"make clean\" may damage the source tree")
121endif()
122
Note: See TracBrowser for help on using the repository browser.