CMakeLists.txt 2.09 KB
Newer Older
florent's avatar
florent committed
1
#
Florent Lamiraux's avatar
Florent Lamiraux committed
2
3
# Copyright (c) 2010, 2011 CNRS
# Authors: Florent Lamiraux
florent's avatar
florent committed
4
5
#
#
Florent Lamiraux's avatar
Florent Lamiraux committed
6
7
8
9
10
# This file is part of hpp-core
# hpp-core 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.
florent's avatar
florent committed
11
#
Florent Lamiraux's avatar
Florent Lamiraux committed
12
13
14
15
16
17
18
19
20
# hpp-core 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
# hpp-core  If not, see
# <http://www.gnu.org/licenses/>.

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
florent's avatar
florent committed
21

Florent Lamiraux's avatar
Florent Lamiraux committed
22
23
24
SET(CXX_DISABLE_WERROR TRUE)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/cpack.cmake)
florent's avatar
florent committed
25

Florent Lamiraux's avatar
Florent Lamiraux committed
26
27
28
29
30
SET(PROJECT_NAME hpp-core)
SET(PROJECT_DESCRIPTION
  "Implement basic classes used as interfaces with KineoPathPlanner"
  )
SET(PROJECT_URL "")
florent's avatar
florent committed
31

Florent Lamiraux's avatar
Florent Lamiraux committed
32
33
# Where to compile shared objects
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
florent's avatar
florent committed
34

Florent Lamiraux's avatar
Florent Lamiraux committed
35
SETUP_PROJECT()
florent's avatar
florent committed
36

Florent Lamiraux's avatar
Florent Lamiraux committed
37
38
39
40
41
# Activate hpp-util logging if requested
IF (HPP_DEBUG)
  MESSAGE(STATUS "Activate hpp-util logging.")
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
ENDIF()
florent's avatar
florent committed
42
43
44
45

#
#  Optional Dependency to package hppModel
#
Florent Lamiraux's avatar
Florent Lamiraux committed
46
IF(ENABLE_BODY)
florent's avatar
florent committed
47
48
  MESSAGE(STATUS "using internal implementation of ChppBody")
  SET(BODY_CFLAGS "IMPLEMENT_BODY=1")
Florent Lamiraux's avatar
Florent Lamiraux committed
49
50
51
52
53
54
55
  SET(BODY_HEADER_PATH="hpp-model")
  # install hpp/model/body.hh
  INSTALL(FILES include/hpp-model/hpp/model/body.hh
    DESTINATION include/hpp/model
    )
ELSE(ENABLE_BODY)
  MESSAGE(STATUS "using external implementation of hpp::model::Body")
Florent Lamiraux's avatar
Florent Lamiraux committed
56
  ADD_REQUIRED_DEPENDENCY("hpp-model >= 1.8")
Florent Lamiraux's avatar
Florent Lamiraux committed
57
58
59
60
ENDIF(ENABLE_BODY)

# Declare Headers
SET(${PROJECT_NAME}_HEADERS
61
  include/hpp/core/fwd.hh
Florent Lamiraux's avatar
Florent Lamiraux committed
62
63
64
65
  include/hpp/core/collision-pair.hh
  include/hpp/core/planner.hh
  include/hpp/core/problem.hh
)
florent's avatar
florent committed
66

Florent Lamiraux's avatar
Florent Lamiraux committed
67
ADD_REQUIRED_DEPENDENCY("kwsPlus >= 1.8")
florent's avatar
florent committed
68

Florent Lamiraux's avatar
Florent Lamiraux committed
69
70
# Add dependency toward hpp-model library in pkg-config file.
PKG_CONFIG_APPEND_LIBS("hpp-core")
florent's avatar
florent committed
71
72
73

ADD_SUBDIRECTORY(src)

Florent Lamiraux's avatar
Florent Lamiraux committed
74
75
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()