-
Notifications
You must be signed in to change notification settings - Fork 0
/
mujincontrollerclient-config.cmake.in
89 lines (83 loc) · 4.32 KB
/
mujincontrollerclient-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
# - Find Mujin Controller Client C++ Library
#
# Users can set the following variables before calling the module:
# MujinControllerClient_DIR - The preferred installation prefix for searching for MujinControllerClient. Set by the user.
#
# MujinControllerClient_ROOT_DIR - the root directory where the installation can be found
# MujinControllerClient_CXX_FLAGS - extra flags for compilation
# MujinControllerClient_LINK_FLAGS - extra flags for linking
# MujinControllerClient_INCLUDE_DIRS - include directories
# MujinControllerClient_LIBRARY_DIRS - link directories
# MujinControllerClient_LIBRARIES - libraries to link plugins with
# MujinControllerClient_Boost_VERSION - the boost version 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.)
#==================================================================================
if( MSVC )
get_filename_component(MujinControllerClient_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set( MujinControllerClient_INCLUDE_DIRS "@MujinControllerClient_INCLUDE_DIR@;${MujinControllerClient_ROOT_DIR}/include")
else()
get_filename_component(_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_PREFIX "${_PREFIX}" PATH)
get_filename_component(_PREFIX "${_PREFIX}" PATH)
get_filename_component(MujinControllerClient_ROOT_DIR "${_PREFIX}" PATH)
set( MujinControllerClient_INCLUDE_DIRS "${MujinControllerClient_ROOT_DIR}/include")
endif()
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(MujinControllerClient_LIBRARY_SUFFIX "@MUJINCLIENT_VERSION_MAJOR@.@MUJINCLIENT_VERSION_MINOR@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the mujin client libraries" FORCE)
else()
set(MujinControllerClient_LIBRARY_SUFFIX "@MUJINCLIENT_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the mujin client libraries" FORCE)
endif()
set( MujinControllerClient_CXX_FLAGS "-DMUJINCLIENT_DLL @MUJINCLIENT_EXPORT_CXXFLAGS@ @MUJINCLIENT_LOG4CXX_INCLUDE_DIRS@" )
if( WIN32 )
set( MujinControllerClient_CXX_FLAGS "${MujinControllerClient_CXX_FLAGS} -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB")
endif()
if( MSVC )
set( MujinControllerClient_CXX_FLAGS "${MujinControllerClient_CXX_FLAGS} /EHc-")
endif()
set( MujinControllerClient_LINK_FLAGS "@MUJINCLIENT_LOG4CXX_LIB_DIRS@" )
set( MujinControllerClient_LIBRARY_DIRS "${MujinControllerClient_ROOT_DIR}/lib@LIB_SUFFIX@")
set( MujinControllerClient_LIBRARIES mujincontrollerclient${MujinControllerClient_LIBRARY_SUFFIX} @LOG4CXX_LIBRARIES@)
set( MujinControllerClient_Boost_VERSION "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@")
if( WIN32 )
# search for the boost version was compiled with
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost ${MujinControllerClient_Boost_VERSION} EXACT COMPONENTS thread date_time)
if(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
set( MujinControllerClient_INCLUDE_DIRS "${MujinControllerClient_INCLUDE_DIRS}" ${Boost_INCLUDE_DIRS})
set( MujinControllerClient_LIBRARY_DIRS "${MujinControllerClient_LIBRARY_DIRS}" ${Boost_LIBRARY_DIRS})
else(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
message(WARNING "Failed to find Boost ${MujinControllerClient_Boost_VERSION} necessary MujinControllerClient")
endif(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
endif( WIN32 )
mark_as_advanced(
MujinControllerClient_ROOT_DIR
MujinControllerClient_CXX_FLAGS
MujinControllerClient_LINK_FLAGS
MujinControllerClient_INCLUDE_DIRS
MujinControllerClient_LIBRARY_DIRS
MujinControllerClient_LIBRARIES
MujinControllerClient_Boost_VERSION
)