Commit 1828a89a authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Adapted to just one Find.cmake

parent 0b8bf5d6
#edit the following line to add the librarie's header files
FIND_PATH(bno055_imu_sim_INCLUDE_DIR bno055_imu_sim.h bno055_imu_exceptions.h bno055_common.h /usr/include/iridrivers /usr/local/include/iridrivers)
FIND_LIBRARY(bno055_imu_sim_LIBRARY
NAMES bno055_imu_sim
PATHS /usr/lib /usr/local/lib /usr/local/lib/iridrivers)
IF (bno055_imu_sim_INCLUDE_DIR AND bno055_imu_sim_LIBRARY)
SET(bno055_imu_sim_FOUND TRUE)
ENDIF (bno055_imu_sim_INCLUDE_DIR AND bno055_imu_sim_LIBRARY)
IF (bno055_imu_sim_FOUND)
IF (NOT bno055_imu_sim_FIND_QUIETLY)
MESSAGE(STATUS "Found bno055_imu_sim: ${bno055_imu_sim_LIBRARY}")
ENDIF (NOT bno055_imu_sim_FIND_QUIETLY)
ELSE (bno055_imu_sim_FOUND)
IF (bno055_imu_sim_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find bno055_imu_sim")
ENDIF (bno055_imu_sim_FIND_REQUIRED)
ENDIF (bno055_imu_sim_FOUND)
......@@ -5,7 +5,7 @@ SET(headers ../include/bno055_imu_driver.h ../include/bno055_imu_exceptions.h ..
# simulator source files
SET(sources_sim bno055_imu_sim.cpp bno055_imu_exceptions.cpp)
# application header files
SET(headers_sim ../include/bno055_imu_sim.h ../include/bno055_imu_exceptions.h ../include/bno055_common.h)
SET(headers_sim ../include/bno055_imu_sim.h)
# locate the necessary dependencies
FIND_PACKAGE(iriutils REQUIRED)
FIND_PACKAGE(comm REQUIRED)
......@@ -36,6 +36,5 @@ INSTALL(TARGETS bno055_imu_sim
ARCHIVE DESTINATION lib/iridrivers)
INSTALL(FILES ${headers_sim} DESTINATION include/iridrivers)
INSTALL(FILES ../Findbno055_imu_driver.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
INSTALL(FILES ../Findbno055_imu_sim.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
ADD_SUBDIRECTORY(examples)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment