CMakeLists.txt 1.79 KB
Newer Older
Gabriele Buondonno's avatar
Gabriele Buondonno committed
1
2
3
#
# Copyright (c) 2019 CNRS
#
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This file is part of eiquadprog.
#
# eiquadprog is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# eiquadprog is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eiquadprog.  If not, see <https://www.gnu.org/licenses/>.
#
Gabriele Buondonno's avatar
Gabriele Buondonno committed
19

Guilhem Saurel's avatar
Guilhem Saurel committed
20
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
Gabriele Buondonno's avatar
Gabriele Buondonno committed
21

Guilhem Saurel's avatar
Guilhem Saurel committed
22
SET(PROJECT_NAMESPACE stack-of-tasks)
Gabriele Buondonno's avatar
Gabriele Buondonno committed
23
24
SET(PROJECT_NAME eiquadprog)
SET(PROJECT_DESCRIPTION "C++ reimplementation of eiquadprog")
Guilhem Saurel's avatar
Guilhem Saurel committed
25
SET(PROJECT_URL "https://gepgitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME}")
26
SET(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
Gabriele Buondonno's avatar
Gabriele Buondonno committed
27

Guilhem Saurel's avatar
Guilhem Saurel committed
28
29
30
31
32
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/test.cmake)

Gabriele Buondonno's avatar
Gabriele Buondonno committed
33
34
35
36
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)

Guilhem Saurel's avatar
Guilhem Saurel committed
37
38
CMAKE_POLICY(SET CMP0048 NEW)
PROJECT(${PROJECT_NAME} VERSION ${PROJECT_VERSION_FULL} LANGUAGES CXX)
Gabriele Buondonno's avatar
Gabriele Buondonno committed
39

Gabriele Buondonno's avatar
Gabriele Buondonno committed
40
41
42
# ----------------------------------------------------
# --- DEPENDENCIES -----------------------------------
# ----------------------------------------------------
Guilhem Saurel's avatar
Guilhem Saurel committed
43
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2.92")
Gabriele Buondonno's avatar
Gabriele Buondonno committed
44

Guilhem Saurel's avatar
Guilhem Saurel committed
45
SET(BOOST_COMPONENTS unit_test_framework)
Gabriele Buondonno's avatar
Gabriele Buondonno committed
46
47
SEARCH_FOR_BOOST()
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
Gabriele Buondonno's avatar
Gabriele Buondonno committed
48
49
50

# --- PACKAGING ----------------------------------------------------------------
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
Gabriele Buondonno's avatar
Gabriele Buondonno committed
51

Guilhem Saurel's avatar
Guilhem Saurel committed
52
ADD_SUBDIRECTORY(include/${PROJECT_NAME})
Gabriele Buondonno's avatar
Gabriele Buondonno committed
53
ADD_SUBDIRECTORY(unittest)