Skip to content
Snippets Groups Projects
Commit 49b8ffab authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

CMake fixes

parent 132ddd2d
No related branches found
No related tags found
No related merge requests found
......@@ -320,7 +320,7 @@ INSTALL(FILES ${HDRS_SERIALIZATION}
INSTALL(FILES ${HDRS_YAML}
DESTINATION include/iri-algorithms/wolf/plugin_${PROJECT_NAME}/${PROJECT_NAME}/yaml)
INSTALL(FILES IMU.found
INSTALL(FILES ${PROJECT_NAME}.found
DESTINATION include/iri-algorithms/wolf/plugin_${PROJECT_NAME})
INSTALL(FILES "${CMAKE_SOURCE_DIR}/cmake_modules/Findwolf${PROJECT_NAME}.cmake"
DESTINATION "lib/cmake/wolf${PROJECT_NAME}")
......
#edit the following line to add the librarie's header files
FIND_PATH(
example_INCLUDE_DIRS
# NAMES wolf.found
PATHS /usr/local/include/iri-algorithms/wolf/example)
IMU_INCLUDE_DIRS
NAMES IMU.found
PATHS /usr/local/include/iri-algorithms/wolf/plugin_IMU)
#change INCLUDE_DIRS to its parent directory
# get_filename_component(example_INCLUDE_DIRS ${example_INCLUDE_DIRS} DIRECTORY)
IF(example_INCLUDE_DIRS)
MESSAGE("Found example include dirs: ${example_INCLUDE_DIRS}")
IF(IMU_INCLUDE_DIRS)
MESSAGE("Found IMU include dirs: ${IMU_INCLUDE_DIRS}")
ELSE
MESSAGE("Couldn't find example include dirs")
MESSAGE("Couldn't find IMU include dirs")
ENDIF
FIND_LIBRARY(
example_LIBRARY
NAMES libexample.so
PATHS /usr/lib /usr/local/lib /usr/local/lib/iri-algorithms)
IF(example_LIBRARY)
MESSAGE("Found example lib: ${example_LIBRARY}")
IMU_LIBRARY
NAMES libwolfIMU.so
PATHS /usr/lib /usr/local/lib /usr/local/lib/iri-algorithms)
IF(IMU_LIBRARY)
MESSAGE("Found IMU lib: ${IMU_LIBRARY}")
ELSE
MESSAGE("Couldn't find example lib")
MESSAGE("Couldn't find IMU lib")
ENDIF
IF (example_INCLUDE_DIRS AND example_LIBRARY)
SET(example_FOUND TRUE)
ENDIF (example_INCLUDE_DIRS AND example_LIBRARY)
IF (IMU_INCLUDE_DIRS AND IMU_LIBRARY)
SET(IMU_FOUND TRUE)
ENDIF (IMU_INCLUDE_DIRS AND IMU_LIBRARY)
IF (example_FOUND)
IF (NOT example_FIND_QUIETLY)
MESSAGE(STATUS "Found example: ${example_LIBRARY}")
ENDIF (NOT example_FIND_QUIETLY)
ELSE (example_FOUND)
IF (IMU_FOUND)
IF (NOT IMU_FIND_QUIETLY)
MESSAGE(STATUS "Found IMU: ${IMU_LIBRARY}")
ENDIF (NOT IMU_FIND_QUIETLY)
ELSE (IMU_FOUND)
IF (wolf_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find example")
MESSAGE(FATAL_ERROR "Could not find IMU")
ENDIF (wolf_FIND_REQUIRED)
ENDIF (example_FOUND)
ENDIF (IMU_FOUND)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment