Commit d75d5b11 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Install to subfolder. Add plural cmake variables. Add gitignore

Modified the necessary files to save the headers, the library and all the related files on the subdirectory iri/<package_name>
Add plural _INCLUDE_DIRS and _LIBRARIES find cmake variables.
Add .gitignore file to ignore bin, build and lib directories
parent 11eb116f
bin
build
lib
#edit the following line to add the librarie's header files
FIND_PATH(battery_monitor_INCLUDE_DIR battery_monitor.h /usr/include/iridrivers /usr/local/include/iridrivers)
FIND_PATH(battery_monitor_INCLUDE_DIR battery_monitor.h /usr/include/iri/battery_monitor /usr/local/include/iri/battery_monitor)
FIND_LIBRARY(battery_monitor_LIBRARY
NAMES battery_monitor
PATHS /usr/lib /usr/local/lib /usr/local/lib/iridrivers)
PATHS /usr/lib /usr/local/lib /usr/local/lib/iri/battery_monitor)
SET(battery_monitor_INCLUDE_DIRS ${battery_monitor_INCLUDE_DIR})
SET(battery_monitor_LIBRARIES ${battery_monitor_LIBRARY})
IF (battery_monitor_INCLUDE_DIR AND battery_monitor_LIBRARY)
SET(battery_monitor_FOUND TRUE)
......@@ -17,5 +20,4 @@ ELSE (battery_monitor_FOUND)
IF (battery_monitor_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find battery_monitor")
ENDIF (battery_monitor_FIND_REQUIRED)
ENDIF (battery_monitor_FOUND)
ENDIF (battery_monitor_FOUND)
\ No newline at end of file
......@@ -24,8 +24,8 @@ TARGET_LINK_LIBRARIES(battery_monitor ${dynamixel_LIBRARY})
# link necessary libraries
INSTALL(TARGETS battery_monitor
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/iridrivers
ARCHIVE DESTINATION lib/iridrivers)
INSTALL(FILES ${headers} DESTINATION include/iridrivers)
LIBRARY DESTINATION lib/iri/${PROJECT_NAME}
ARCHIVE DESTINATION lib/iri/${PROJECT_NAME})
INSTALL(FILES ${headers} DESTINATION include/iri/${PROJECT_NAME})
INSTALL(FILES ../Findbattery_monitor.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