forked from jrl-umi3218/RBDyn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
76 lines (59 loc) · 2.18 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
# Copyright 2012-2017 CNRS-UM LIRMM, CNRS-AIST JRL
#
# This file is part of RBDyn.
#
# RBDyn 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.
#
# RBDyn 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 RBDyn. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 2.8)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/cpack.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/msvc-specific.cmake)
SET(PROJECT_NAME RBDyn)
SET(PROJECT_DESCRIPTION "...")
SET(PROJECT_URL "https://github.com/jorisv/RBDyn")
SET(PROJECT_DEBUG_POSTFIX "_d")
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SETUP_PROJECT()
option(PYTHON_BINDING "Generate python binding." ON)
option(PYTHON_BINDING_USER_INSTALL "Install the Python bindings in user space" OFF)
option(DISABLE_TESTS "Disable unit tests." OFF)
option(BENCHMARKS "Generate benchmarks." OFF)
if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-sign-conversion -std=c++0x -pedantic")
endif()
#########################
# External dependencies
SEARCH_FOR_EIGEN()
ADD_REQUIRED_DEPENDENCY("SpaceVecAlg")
#########################
# For MSVC, set local environment variable to enable finding the built dll
# of the main library when launching ctest with RUN_TESTS
IF(MSVC)
SET(CMAKE_MSVCIDE_RUN_PATH "\$(SolutionDir)/src/\$(Configuration)")
ENDIF(MSVC)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(src)
if(NOT ${DISABLE_TESTS} OR ${BENCHMARKS})
add_subdirectory(tests)
endif()
if(${PYTHON_BINDING})
add_subdirectory(binding/python)
endif()
# Add dependency towards the library in the pkg-config file.
PKG_CONFIG_APPEND_LIBS(RBDyn)
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()
SETUP_PROJECT_PACKAGE_FINALIZE()