File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,17 @@ if (NOT pinocchio_FOUND)
2727 return ()
2828 endif ()
2929
30- # Extract version from the library filename
30+ # Check if the library file exists
31+ cmake_path (APPEND Python3_SITELIB cmeel.prefix lib libpinocchio_parsers.so OUTPUT_VARIABLE pinocchio_parsers_path )
32+ if (NOT EXISTS ${pinocchio_parsers_path} )
33+ set (pinocchio_FOUND FALSE )
34+ if (pinocchio_FIND_REQUIRED)
35+ message (FATAL_ERROR "Could not find pinocchio parsers path. Please install pinocchio using pip." )
36+ endif ()
37+ return ()
38+ endif ()
39+
40+ Extract version from the library filename
3141 file (GLOB pinocchio_dist_info "${Python3_SITELIB} /pin-*.dist-info" )
3242 cmake_path (GET pinocchio_dist_info FILENAME pinocchio_library_filename )
3343 string (REPLACE "pin-" "" pinocchio_VERSION "${pinocchio_library_filename} " )
@@ -39,7 +49,7 @@ if (NOT pinocchio_FOUND)
3949 set_target_properties (
4050 pinocchio::pinocchio
4151 PROPERTIES
42- IMPORTED_LOCATION "${pinocchio_library_path} "
52+ IMPORTED_LOCATION "${pinocchio_library_path} " " ${pinocchio_parsers_path} "
4353 )
4454 set (pinocchio_FOUND TRUE )
4555endif ()
You can’t perform that action at this time.
0 commit comments