CMakeLists.txt 2.3 KB
Newer Older
Gabriele Buondonno's avatar
Gabriele Buondonno committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# Copyright (c) 2019 CNRS
#
# This file is part of eiquadprog
# pinocchio 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.
# pinocchio 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
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# pinocchio If not, see
# <http://www.gnu.org/licenses/>.

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
Gabriele Buondonno's avatar
Gabriele Buondonno committed
21
22
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/test.cmake)
Gabriele Buondonno's avatar
Gabriele Buondonno committed
23
24
25

SET(PROJECT_NAME eiquadprog)
SET(PROJECT_DESCRIPTION "C++ reimplementation of eiquadprog")
26
SET(PROJECT_URL "https://gepgitlab.laas.fr/gbuondon/eiquadprog")
27
SET(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
Gabriele Buondonno's avatar
Gabriele Buondonno committed
28
29
30
31
32

# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)

Gabriele Buondonno's avatar
Gabriele Buondonno committed
33
34
SETUP_PROJECT()

Gabriele Buondonno's avatar
Gabriele Buondonno committed
35
36
37
# ----------------------------------------------------
# --- DEPENDENCIES -----------------------------------
# ----------------------------------------------------
Gabriele Buondonno's avatar
Gabriele Buondonno committed
38
ADD_REQUIRED_DEPENDENCY("eigen3")
Gabriele Buondonno's avatar
Gabriele Buondonno committed
39
40
41
42
43
44

# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
# ----------------------------------------------------
# Add headers here if any
SET(${PROJECT_NAME}_HEADERS
Gabriele Buondonno's avatar
Gabriele Buondonno committed
45
    include/eiquadprog/eiquadprog.hpp
46
    include/eiquadprog/eiquadprog-fast.hpp
47
    include/eiquadprog/eiquadprog-fast.hxx
Gabriele Buondonno's avatar
Gabriele Buondonno committed
48
49
  )

50
51
52
53
54
INSTALL(FILES
  ${${PROJECT_NAME}_HEADERS}
  DESTINATION include/${PROJECT_NAME}
  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
  )
55

Gabriele Buondonno's avatar
Gabriele Buondonno committed
56
57
58
59
60
61
SET(BOOST_REQUIERED_COMPONENTS "")
SET(BOOST_BUILD_COMPONENTS unit_test_framework)
SET(BOOST_OPTIONAL_COMPONENTS "")

SET(BOOST_COMPONENTS ${BOOST_REQUIERED_COMPONENTS} ${BOOST_OPTIONAL_COMPONENTS} ${BOOST_BUILD_COMPONENTS})
SEARCH_FOR_BOOST()
Gabriele Buondonno's avatar
Gabriele Buondonno committed
62

Gabriele Buondonno's avatar
Gabriele Buondonno committed
63
64
# Path to boost headers
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
Gabriele Buondonno's avatar
Gabriele Buondonno committed
65
66
67

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

ADD_SUBDIRECTORY(unittest)
70
71

SETUP_PROJECT_FINALIZE()