forked from robotology/yarp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
96 lines (75 loc) · 3.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Copyright: (C) 2009, 2010 RobotCub Consortium
# Authors: Paul Fitzpatrick, Giorgio Metta, Lorenzo Natale
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
cmake_minimum_required(VERSION 2.8.9)
# CMake Policy CMP0020 (Automatically link Qt executables to qtmain
# target on Windows). Can be removed with
# CMAKE_MINIMUM_REQUIRED_VERSION 2.8.11 or later.
if(NOT ${CMAKE_MINIMUM_REQUIRED_VERSION} VERSION_LESS 2.8.11)
message(AUTHOR_WARNING "CMake Policy CMP0020 is now NEW by default. You can remove this.")
endif()
if(NOT ${CMAKE_VERSION} VERSION_LESS 2.8.11)
cmake_policy(SET CMP0020 NEW)
endif()
project(YARP)
# Pick up our CMake scripts - they are all in the conf subdirectory.
set(YARP_MODULE_DIR ${PROJECT_SOURCE_DIR}/conf)
set(YARP_MODULE_PATH ${YARP_MODULE_DIR})
if(${CMAKE_VERSION} VERSION_LESS 3.5)
list(APPEND YARP_MODULE_PATH ${PROJECT_SOURCE_DIR}/conf/cmake-3.5/Modules)
endif()
if(${CMAKE_VERSION} VERSION_LESS 3.1)
list(APPEND YARP_MODULE_PATH ${PROJECT_SOURCE_DIR}/conf/cmake-3.1/Modules)
endif()
set(CMAKE_MODULE_PATH ${YARP_MODULE_PATH})
# The YARP build is fairly flexible, so we need to accumulate some
# information about what libraries are being built (and their dependencies),
# along with the include path. We'll be passing that along to clients
# using YARP without a global install.
set_property(GLOBAL PROPERTY YARP_TREE_INCLUDE_DIRS)
set_property(GLOBAL PROPERTY YARP_LIBS)
set_property(GLOBAL PROPERTY YARP_DEFS)
# Get the current YARP version.
# See conf/YarpVersion.cmake.
include(YarpVersion)
# Check system configuration.
# See conf/YarpSystemCheck.cmake.
include(YarpSystemCheck)
# Set up some compilation options.
# See conf/YarpOptions.cmake.
include(YarpOptions)
# Include some workarounds for older cmake versions
# See conf/YarpCMakeWorkarounds.cmake
include(YarpCMakeWorkarounds)
# Check YARP dependencies, find necessary libraries.
# See conf/YarpFindDependencies.cmake.
include(YarpFindDependencies)
# Make some custom header files containing compile settings.
add_subdirectory(conf)
# Build required 3rd party libraries
add_subdirectory(extern)
# Set up the main libraries and utilities.
add_subdirectory(src)
# Offer to compile bindings
add_subdirectory(bindings)
# Tests
add_subdirectory(tests)
# Platform independent data
add_subdirectory(data)
# add rule for uninstalling YARP
# see conf/YARPUninstall.cmake
include(YARPUninstall)
# Output configuration files describing how YARP was built, and how
# its libraries may be linked against and used. This uses
# information accumulated in the global property variables set up earlier.
# See conf/YarpDescribe.cmake
include(YarpDescribe)
# Set up some packaging properties (for generating tarballs etc).
# See conf/YarpPackage.cmake
include(YarpPackage)
# Make documentation target, documentation goes in doc subdirectory
# of build. See conf/YarpDoc.cmake
include(YarpDoc)
# Make sure yarp.i and related source files get installed, to allow
# bindings for other languages to be compiled from the build material.
include(YarpBindingsSource)