CMakeLists.txt 4.67 KB
Newer Older
Steve Tonneau's avatar
Steve Tonneau committed
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
# Copyright (c) 2012 CNRS
# Author: Florent Lamiraux
#
# This file is part of hpp-rbprm-corba.
# hpp-rbprm-corba 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.
#
# hpp-rbprm-corba 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-rbprm-corba.  If not, see
# <http://www.gnu.org/licenses/>.

SET(LIBRARY_NAME ${PROJECT_NAME})
SET(IDL_SOURCES
	rbprmbuilder
)

SET(HPP_CORBASERVER_IDL_SOURCES
  common
)

OMNIIDL_INCLUDE_DIRECTORIES(
  ${HPP_CORBASERVER_DATAROOTDIR}/idl ${CMAKE_SOURCE_DIR}/idl
  )

Steve Tonneau's avatar
Steve Tonneau committed
31
32
33
# search for python
FINDPYTHON(2.7 EXACT REQUIRED)

Steve Tonneau's avatar
Steve Tonneau committed
34
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
Steve Tonneau's avatar
Steve Tonneau committed
35
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm)
Steve Tonneau's avatar
Steve Tonneau committed
36
FOREACH(IDL ${IDL_SOURCES})
37
  GENERATE_IDL_CPP (${IDL}
Steve Tonneau's avatar
Steve Tonneau committed
38
    ${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm
39
40
41
42
		)
  GENERATE_IDL_PYTHON (${IDL}
	    ${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm
		)
Steve Tonneau's avatar
Steve Tonneau committed
43
44
ENDFOREACH()

Steve Tonneau's avatar
Steve Tonneau committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FOREACH(IDL ${IDL_SOURCES})
  GENERATE_IDL_CPP (hpp/corbaserver/rbprm/${IDL}
    ${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm)
  GENERATE_IDL_PYTHON (hpp/corbaserver/rbprm/${IDL}
    ${CMAKE_SOURCE_DIR}/idl/hpp/corbaserver/rbprm)

  INSTALL(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/${IDL}.hh
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hpp/corbaserver/rbprm)
  INSTALL(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/${IDL}_idl.py
    DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm)
ENDFOREACH()

Steve Tonneau's avatar
Steve Tonneau committed
59
FOREACH(IDL ${HPP_CORBASERVER_IDL_SOURCES})
60
  GENERATE_IDL_CPP (${IDL}
Steve Tonneau's avatar
Steve Tonneau committed
61
    ${HPP_CORBASERVER_DATAROOTDIR}/idl/hpp/corbaserver
Steve Tonneau's avatar
Steve Tonneau committed
62
63
64
65
66
67
68
    )
  GENERATE_IDL_PYTHON (${IDL}
    ${HPP_CORBASERVER_DATAROOTDIR}/idl/hpp/corbaserver
    )
  INSTALL(FILES
    ${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py
    DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm)
Steve Tonneau's avatar
Steve Tonneau committed
69
70
71
72
73
ENDFOREACH()

ADD_LIBRARY(${LIBRARY_NAME} SHARED
  common.hh
  commonSK.cc
Steve Tonneau's avatar
Steve Tonneau committed
74
75
76
77
78
  ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/rbprmbuilder.hh
  ${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/rbprm/rbprmbuilderSK.cc
  rbprmbuilder.impl.cc
  rbprmbuilder.impl.hh
  server.cc
Steve Tonneau's avatar
Steve Tonneau committed
79
80
)

81
82
83
84
ADD_CUSTOM_TARGET(generate_idl_cpp DEPENDS ${ALL_IDL_CPP_STUBS})
ADD_CUSTOM_TARGET(generate_idl_python DEPENDS ${ALL_IDL_PYTHON_STUBS})
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_cpp)
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_python)
Guilhem Saurel's avatar
Guilhem Saurel committed
85
TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} PUBLIC ${CDD_INCLUDE_DIRS})
86

Steve Tonneau's avatar
Steve Tonneau committed
87
88
89
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-rbprm)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-corbaserver)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} omniORB4)
90
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-affordance-corba)
91
92
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-rbprm)
Steve Tonneau's avatar
Steve Tonneau committed
93
94
95
96
97

INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)

INSTALL(
  FILES
98
  ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/__init__.py
Steve Tonneau's avatar
Steve Tonneau committed
99
100
101
102
103
104
  DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm
  )
INSTALL(
  FILES
	${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/client.py
	${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/rbprmbuilder.py
Steve Tonneau's avatar
Steve Tonneau committed
105
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/rbprmfullbody.py
t steve's avatar
t steve committed
106
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/rbprmstate.py
107
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/state_alg.py
Steve Tonneau's avatar
Steve Tonneau committed
108
109
  DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm
  )
Steve Tonneau's avatar
Steve Tonneau committed
110
111
112
INSTALL(
  FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/__init__.py
t steve's avatar
t steve committed
113
114
				${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/generateROMs.py
				${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/com_constraints.py
Steve Tonneau's avatar
Steve Tonneau committed
115
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/plot_analytics.py
116
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/cwc_trajectory.py
117
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/cwc_trajectory_helper.py
118
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/path_to_trajectory.py
119
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/obj_to_constraints.py
120
        ${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/rbprm/tools/time_out.py
Steve Tonneau's avatar
Steve Tonneau committed
121
122
  DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/rbprm/tools
  )
Steve Tonneau's avatar
Steve Tonneau committed
123
124
125
# Stand alone corba server
ADD_EXECUTABLE (hpp-rbprm-server hpp-rbprm-corba.cc)
TARGET_LINK_LIBRARIES (hpp-rbprm-server ${LIBRARY_NAME} hpp-rbprm)
126

Steve Tonneau's avatar
Steve Tonneau committed
127
INSTALL (TARGETS hpp-rbprm-server DESTINATION ${CMAKE_INSTALL_BINDIR})