@@ -130,16 +130,55 @@ include(FindSWIG)
130
130
find_package (SWIG 4.1.1 REQUIRED )
131
131
include (UseSWIG )
132
132
133
+ macro (tesseract_python_find_target lib_name search_target )
134
+ # Find install directory of search_target
135
+
136
+ get_target_property (search_target_location ${search_target} LOCATION )
137
+ if (NOT WIN32 )
138
+ get_filename_component (search_target_location_dir ${search_target_location} DIRECTORY )
139
+ else ()
140
+ get_filename_component (search_target_location_dir1 ${search_target_location} DIRECTORY )
141
+ get_filename_component (search_target_location_dir2 ${search_target_location_dir1} DIRECTORY )
142
+ set (search_target_location_dir "${search_target_location_dir2} /lib" )
143
+ endif ()
144
+ # Find library lib_name
145
+ unset (lib_name_location )
146
+ find_library (lib_name_location ${lib_name} HINTS ${search_target_location_dir} NO_CACHE )
147
+ if (NOT lib_name_location )
148
+ message (FATAL_ERROR "Could not find library ${lib_name} " )
149
+ endif ()
150
+ # Create import target
151
+ add_library (tesseract::${lib_name} SHARED IMPORTED )
152
+ if (WIN32 )
153
+ set_target_properties (tesseract::${lib_name} PROPERTIES IMPORTED_IMPLIB_RELWITHDEBINFO ${lib_name_location} )
154
+ set_target_properties (tesseract::${lib_name} PROPERTIES IMPORTED_IMPLIB ${lib_name_location} )
155
+ set_target_properties (tesseract::${lib_name} PROPERTIES IMPORTED_LOCATION ${lib_name_location} )
156
+ else ()
157
+ set_target_properties (tesseract::${lib_name} PROPERTIES IMPORTED_LOCATION ${lib_name_location} )
158
+ endif ()
159
+ endmacro ()
160
+
161
+ tesseract_python_find_target (tesseract_collision_fcl_factories tesseract::tesseract_collision_core )
162
+ tesseract_python_find_target (tesseract_collision_bullet_factories tesseract::tesseract_collision_core )
163
+ tesseract_python_find_target (tesseract_kinematics_kdl_factories tesseract::tesseract_kinematics_core )
164
+ tesseract_python_find_target (tesseract_kinematics_ur_factory tesseract::tesseract_kinematics_core )
165
+ tesseract_python_find_target (tesseract_kinematics_opw_factory tesseract::tesseract_kinematics_core )
166
+ #tesseract_python_find_target(tesseract_kinematics_core_factories tesseract::tesseract_kinematics_core)
167
+ tesseract_python_find_target (tesseract_task_composer_factories tesseract::tesseract_task_composer )
168
+ tesseract_python_find_target (tesseract_task_composer_planning_factories tesseract::tesseract_task_composer )
169
+ # tesseract_python_find_target(tesseract_task_composer_planning_nodes tesseract::tesseract_task_composer)
170
+ tesseract_python_find_target (tesseract_task_composer_taskflow_factories tesseract::tesseract_task_composer )
171
+
133
172
include (${CMAKE_CURRENT_SOURCE_DIR} /cmake/tesseract_python_module.cmake )
134
173
135
174
tesseract_python_module (tesseract_common_python SWIG_SRCS swig/tesseract_common_python.i PACKAGE tesseract_common LIBS tesseract::tesseract_common )
136
175
tesseract_python_module (tesseract_geometry_python SWIG_SRCS swig/tesseract_geometry_python.i PACKAGE tesseract_geometry LIBS tesseract::tesseract_geometry )
137
- tesseract_python_module (tesseract_collision_python SWIG_SRCS swig/tesseract_collision_python.i PACKAGE tesseract_collision LIBS tesseract::tesseract_collision_core Bullet3::Bullet ) # tesseract::tesseract_collision_bullet_factories tesseract::tesseract_collision_fcl_factories )
176
+ tesseract_python_module (tesseract_collision_python SWIG_SRCS swig/tesseract_collision_python.i PACKAGE tesseract_collision LIBS tesseract::tesseract_collision_core Bullet3::Bullet tesseract::tesseract_collision_bullet_factories tesseract::tesseract_collision_fcl_factories )
138
177
tesseract_python_module (tesseract_scene_graph_python SWIG_SRCS swig/tesseract_scene_graph_python.i PACKAGE tesseract_scene_graph LIBS tesseract::tesseract_scene_graph )
139
178
tesseract_python_module (tesseract_srdf_python SWIG_SRCS swig/tesseract_srdf_python.i PACKAGE tesseract_srdf LIBS tesseract::tesseract_srdf )
140
179
tesseract_python_module (tesseract_urdf_python SWIG_SRCS swig/tesseract_urdf_python.i PACKAGE tesseract_urdf LIBS tesseract::tesseract_urdf )
141
180
tesseract_python_module (tesseract_state_solver_python SWIG_SRCS swig/tesseract_state_solver_python.i PACKAGE tesseract_state_solver LIBS tesseract::tesseract_state_solver_core tesseract::tesseract_state_solver_ofkt tesseract::tesseract_state_solver_kdl )
142
- tesseract_python_module (tesseract_kinematics_python SWIG_SRCS swig/tesseract_kinematics_python.i PACKAGE tesseract_kinematics LIBS tesseract::tesseract_kinematics_core ) # tesseract::tesseract_kinematics_kdl_factories tesseract::tesseract_kinematics_ur_factory tesseract::tesseract_kinematics_opw_factory tesseract::tesseract_kinematics_core_factories )
181
+ tesseract_python_module (tesseract_kinematics_python SWIG_SRCS swig/tesseract_kinematics_python.i PACKAGE tesseract_kinematics LIBS tesseract::tesseract_kinematics_core tesseract::tesseract_kinematics_kdl_factories tesseract::tesseract_kinematics_ur_factory tesseract::tesseract_kinematics_opw_factory tesseract::tesseract_kinematics_core_factories )
143
182
tesseract_python_module (tesseract_environment_python SWIG_SRCS swig/tesseract_environment_python.i PACKAGE tesseract_environment LIBS tesseract::tesseract_environment )
144
183
tesseract_python_module (tesseract_visualization_python SWIG_SRCS swig/tesseract_visualization_python.i PACKAGE tesseract_visualization LIBS tesseract::tesseract_visualization )
145
184
tesseract_python_module (tesseract_command_language_python SWIG_SRCS swig/tesseract_command_language_python.i PACKAGE tesseract_command_language LIBS tesseract::tesseract_command_language )
@@ -149,7 +188,7 @@ tesseract_python_module(tesseract_motion_planners_trajopt_python SWIG_SRCS swig/
149
188
tesseract_python_module (tesseract_motion_planners_ompl_python SWIG_SRCS swig/tesseract_motion_planners_ompl_python.i PACKAGE tesseract_motion_planners_ompl LIBS tesseract::tesseract_motion_planners_ompl )
150
189
tesseract_python_module (tesseract_motion_planners_descartes_python SWIG_SRCS swig/tesseract_motion_planners_descartes_python.i PACKAGE tesseract_motion_planners_descartes LIBS tesseract::tesseract_motion_planners_descartes )
151
190
tesseract_python_module (tesseract_time_parameterization_python SWIG_SRCS swig/tesseract_time_parameterization_python.i PACKAGE tesseract_time_parameterization LIBS tesseract::tesseract_time_parameterization_core tesseract::tesseract_time_parameterization_isp tesseract::tesseract_time_parameterization_totg tesseract::tesseract_time_parameterization_ruckig )
152
- tesseract_python_module (tesseract_task_composer_python SWIG_SRCS swig/tesseract_task_composer_python.i PACKAGE tesseract_task_composer LIBS tesseract::tesseract_task_composer tesseract::tesseract_task_composer_nodes tesseract::tesseract_task_composer_taskflow tesseract::tesseract_collision_core ) # tesseract::tesseract_task_composer_factories tesseract::tesseract_task_composer_planning_factories tesseract::tesseract_task_composer_planning tesseract::tesseract_task_composer_taskflow_factories )
191
+ tesseract_python_module (tesseract_task_composer_python SWIG_SRCS swig/tesseract_task_composer_python.i PACKAGE tesseract_task_composer LIBS tesseract::tesseract_task_composer tesseract::tesseract_task_composer_nodes tesseract::tesseract_task_composer_taskflow tesseract::tesseract_collision_core tesseract::tesseract_task_composer_factories tesseract::tesseract_task_composer_planning_factories tesseract::tesseract_task_composer_planning_nodes tesseract::tesseract_task_composer_taskflow_factories )
153
192
154
193
set (TESSERACT_PYTHON_MODULE_TARGETS
155
194
_tesseract_common_python
0 commit comments