Open prashanthr05 opened 6 years ago
Mh. That's strange. Which version of CMake are you using?
Can you post the output of this command in the build directory: cat CMakeCache.txt | grep FMI
?
Thanks
For some reason, your FMILibrary_INCLUDE_DIR
seems to point to /home/pramadoss/iit_ws/robotology_playground/FMILibrary/build
that indeed contains the fmilib.h
searched by the FindFMILibrary.cmake script (https://github.com/robotology-playground/gazebo-fmi/blob/master/cmake/FindFMILibrary.cmake#L43).
Indeed, I am able to replicate your problem if I append FMILibrary/build
instead of the actuall install prefix of the library. In a sense, it is a bug of the FindFMILibrary.cmake script.
I guess the workaround for you is easy, but the actual fix in the FindFMILibrary is not obvious. See http://cmake.3232098.n2.nabble.com/find-path-for-multiple-files-td4666892.html . It is probably easier to just send a patch to FMILibrary for providing a proper FMILibraryConfig.cmake
file.
Which version of CMake are you using?
cmake --versioncmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
>Can you post the output of this command in the build directory: cat CMakeCache.txt | grep FMI ?
cat CMakeCache.txt | grep FMI FMIActuatorPlugin_LIB_DEPENDS:STATIC=general;BulletSoftBody;general;BulletDynamics;general;BulletCollision;general;LinearMath;general;/usr/lib/x86_64-linux-gnu/libSimTKsimbody.so;general;/usr/lib/x86_64-linux-gnu/libSimTKmath.so;general;/usr/lib/x86_64-linux-gnu/libSimTKcommon.so;general;/usr/lib/libblas.so;general;/usr/lib/liblapack.so;general;/usr/lib/libblas.so;general;pthread;general;rt;general;dl;general;m;general;/usr/lib/x86_64-linux-gnu/libgazebo.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_client.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_gui.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_sensors.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_rendering.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_physics.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_ode.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_transport.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_msgs.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_util.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_common.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_gimpact.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_opcode.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_opende_ou.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_math.so;general;/usr/lib/x86_64-linux-gnu/libgazebo_ccd.so;general;/usr/lib/x86_64-linux-gnu/libboost_thread.so;general;/usr/lib/x86_64-linux-gnu/libboost_signals.so;general;/usr/lib/x86_64-linux-gnu/libboost_system.so;general;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;general;/usr/lib/x86_64-linux-gnu/libboost_program_options.so;general;/usr/lib/x86_64-linux-gnu/libboost_regex.so;general;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;general;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;general;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;general;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;general;/usr/lib/x86_64-linux-gnu/libpthread.so;optimized;/usr/lib/x86_64-linux-gnu/libprotobuf.so;debug;/usr/lib/x86_64-linux-gnu/libprotobuf.so;general;-lpthread;general;/usr/lib/x86_64-linux-gnu/libsdformat.so;general;ignition-math3;optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so;general;/usr/lib/x86_64-linux-gnu/libboost_thread.so;general;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;general;/usr/lib/x86_64-linux-gnu/libboost_system.so;general;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;general;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;general;/usr/lib/x86_64-linux-gnu/libpthread.so;optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;general;ignition-math3;general;/usr/lib/x86_64-linux-gnu/libignition-transport3.so;optimized;/usr/lib/x86_64-linux-gnu/libprotobuf.so;debug;/usr/lib/x86_64-linux-gnu/libprotobuf.so;general;-lpthread;general;zmq;general;uuid;general;ignition-msgs0;general;ignition-math3;general;ignition-msgs0;general;ignition-math3;general;FMILibrary::FMILibrary;general;stdc++fs; FMILibrary_INCLUDE_DIR:PATH=/home/pramadoss/iit_ws/robotology_playground/FMILibrary/build FMILibrary_LIBRARY:FILEPATH=/home/pramadoss/iit_ws/robotology_playground/FMILibrary/build/libfmilib_shared.so //Details about finding FMILibrary FIND_PACKAGE_MESSAGE_DETAILS_FMILibrary:INTERNAL=[FMILibrary::FMILibrary][/home/pramadoss/iit_ws/robotology_playground/FMILibrary/build][v()] //ADVANCED property for variable: FMILibrary_INCLUDE_DIR FMILibrary_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: FMILibrary_LIBRARY FMILibrary_LIBRARY-ADVANCED:INTERNAL=1
Indeed, I am able to replicate your problem if I append FMILibrary/build instead of the actuall install prefix of the library.
True. The compilation however succeeds by adding FMI_root/install/lib
and FMI_root/install/include
to CMAKE_PREFIX_PATH
.
I had followed the steps according to the README here. The FMI library was compiled and installed, the
CMAKE_PREFIX_PATH
was appended with theFMILibrary
root folder. However, the compilation ofgazebo-fmi
fails with the following output