forked from rdiankov/openrave
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openrave-config.cmake.in
104 lines (97 loc) · 4.85 KB
/
openrave-config.cmake.in
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
97
98
99
100
101
102
103
104
# - Find Open Robotics Automation Virtual Enviornment (OpenRAVE) Installation
# http://www.openrave.org
#
# OpenRAVE provides an environment for testing, developing, and deploying motion planning algorithms
# in real-world robotics applications. The main focus is on simulation and analysis of kinematic and
# geometric information related to motion planning. OpenRAVE’s stand-alone nature allows is to be easily
# integrated into existing robotics systems. An important target application is industrial robotics automation.
#
# Users can set the following variables before calling the module:
# OpenRAVE_DIR - The preferred installation prefix for searching for OpenRAVE. Set by the user.
#
# OpenRAVE_ROOT_DIR - the root directory where the installation can be found
# OpenRAVE_CXX_FLAGS - extra flags for compilation
# OpenRAVE_LINK_FLAGS - extra flags for linking
# OpenRAVE_INCLUDE_DIRS - include directories
# OpenRAVE_LIBRARY_DIRS - link directories
# OpenRAVE_LIBRARIES - libraries to link plugins with
# OpenRAVE_CORE_LIBRARIES - libraries to link openrave run-time with
# OpenRAVE_PYTHON_DIR - the version-specific path where openravepy.__init__ is, necessary for using shared resources like linking with openravepy_int.so or using ikfast.h
# OpenRAVE_Boost_VERSION - the boost version openrave was compiled with
#==================================================================================
# Copyright (C) 2009-2011 Rosen Diankov
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
#==================================================================================
get_filename_component(_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_PREFIX "${_PREFIX}" PATH)
get_filename_component(_PREFIX "${_PREFIX}" PATH)
get_filename_component(OpenRAVE_ROOT_DIR "${_PREFIX}" PATH)
if( MSVC )
# in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
if( MSVC70 OR MSVC71 )
set(MSVC_PREFIX "vc70")
elseif( MSVC80 )
set(MSVC_PREFIX "vc80")
elseif( MSVC90 )
set(MSVC_PREFIX "vc90")
else()
set(MSVC_PREFIX "vc100")
endif()
set(OpenRAVE_LIBRARY_SUFFIX "${OpenRAVE_VERSION_MAJOR}.${OpenRAVE_VERSION_MINOR}-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the openrave libraries" FORCE)
else()
set(OpenRAVE_LIBRARY_SUFFIX "@OPENRAVE_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the openrave libraries" FORCE)
endif()
set( OpenRAVE_CXX_FLAGS "-DOPENRAVE_DLL -DOPENRAVE_CORE_DLL @OPENRAVE_EXPORT_CXXFLAGS@" )
if( WIN32 )
set( OpenRAVE_CXX_FLAGS "${OpenRAVE_CXX_FLAGS} -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB")
endif()
if( MSVC )
set( OpenRAVE_CXX_FLAGS "${OpenRAVE_CXX_FLAGS} /EHc-")
endif()
set( OpenRAVE_CXXFLAGS "${OpenRAVE_CXX_FLAGS}") # deprecated
set( OpenRAVE_LINK_FLAGS "" )
set( OpenRAVE_INCLUDE_DIRS "${OpenRAVE_ROOT_DIR}/include/@OPENRAVE_INCLUDE_INSTALL_DIR@")
set( OpenRAVE_LIBRARY_DIRS "${OpenRAVE_ROOT_DIR}/lib@LIB_SUFFIX@")
set( OpenRAVE_LIBRARIES openrave${OpenRAVE_LIBRARY_SUFFIX})
set( OpenRAVE_CORE_LIBRARIES ${OpenRAVE_LIBRARIES} openrave${OpenRAVE_LIBRARY_SUFFIX}-core)
# c-bindings only
set( OpenRAVE_C_LIBRARIES openrave${OpenRAVE_LIBRARY_SUFFIX}_c)
set( OpenRAVE_CORE_C_LIBRARIES ${OpenRAVE_C_LIBRARIES} openrave${OpenRAVE_LIBRARY_SUFFIX}-core_c)
if(@USE_OPENRAVEPY@)
set( OpenRAVE_PYTHON_DIR "${OpenRAVE_ROOT_DIR}/@OPENRAVEPY_VER_INSTALL_DIR@")
mark_as_advanced(OpenRAVE_PYTHON_DIR)
endif()
set( OpenRAVE_Boost_VERSION "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@")
if( WIN32 )
# search for the boost version openrave was compiled with
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost ${OpenRAVE_Boost_VERSION} EXACT COMPONENTS thread date_time)
if(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
set( OpenRAVE_INCLUDE_DIRS "${OpenRAVE_INCLUDE_DIRS}" ${Boost_INCLUDE_DIRS})
set( OpenRAVE_LIBRARY_DIRS "${OpenRAVE_LIBRARY_DIRS}" ${Boost_LIBRARY_DIRS})
set( OpenRAVE_CORE_LIBRARIES ${OpenRAVE_CORE_LIBRARIES} ${Boost_THREAD_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
else(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
message(WARNING "Failed to find Boost ${OpenRAVE_Boost_VERSION} necessary OpenRAVE")
endif(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
endif( WIN32 )
mark_as_advanced(
OpenRAVE_ROOT_DIR
OpenRAVE_CXXFLAGS
OpenRAVE_CXX_FLAGS
OpenRAVE_LINK_FLAGS
OpenRAVE_INCLUDE_DIRS
OpenRAVE_LIBRARIES
OpenRAVE_CORE_LIBRARIES
OpenRAVE_Boost_VERSION
)