Commit 77714e4d authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Adapted to CMake plural variables *_DIRS and *_LIBRARIES

parent 409fe268
#edit the following line to add the librarie's header files
FIND_PATH(usb_i2c_adapter_INCLUDE_DIR usb_i2c.h usb_i2c_exceptions.h /usr/local/include/iri/usb_i2c_adapter /usr/include/iri/usb_i2c_adapter)
FIND_PATH(usb_i2c_adapter_INCLUDE_DIRS usb_i2c.h usb_i2c_exceptions.h /usr/local/include/iri/usb_i2c_adapter /usr/include/iri/usb_i2c_adapter)
FIND_LIBRARY(usb_i2c_adapter_LIBRARY
FIND_LIBRARY(usb_i2c_adapter_LIBRARIES
NAMES usb_i2c_adapter
PATHS /usr/local/lib/iri/usb_i2c_adapter /usr/lib/iri/usb_i2c_adapter)
SET(usb_i2c_adapter_INCLUDE_DIRS ${usb_i2c_adapter_INCLUDE_DIR})
SET(usb_i2c_adapter_LIBRARIES ${usb_i2c_adapter_LIBRARY})
SET(usb_i2c_adapter_INCLUDE_DIR ${usb_i2c_adapter_INCLUDE_DIRS})
SET(usb_i2c_adapter_LIBRARY ${usb_i2c_adapter_LIBRARIES})
IF (usb_i2c_adapter_INCLUDE_DIR AND usb_i2c_adapter_LIBRARY)
IF (usb_i2c_adapter_INCLUDE_DIRS AND usb_i2c_adapter_LIBRARIES)
SET(usb_i2c_adapter_FOUND TRUE)
ENDIF (usb_i2c_adapter_INCLUDE_DIR AND usb_i2c_adapter_LIBRARY)
ENDIF (usb_i2c_adapter_INCLUDE_DIRS AND usb_i2c_adapter_LIBRARIES)
IF (usb_i2c_adapter_FOUND)
IF (NOT usb_i2c_adapter_FIND_QUIETLY)
MESSAGE(STATUS "Found usb_i2c_adapter: ${usb_i2c_adapter_LIBRARY}")
MESSAGE(STATUS "Found usb_i2c_adapter: ${usb_i2c_adapter_LIBRARIES}")
ENDIF (NOT usb_i2c_adapter_FIND_QUIETLY)
ELSE (usb_i2c_adapter_FOUND)
IF (usb_i2c_adapter_FIND_REQUIRED)
......
......@@ -8,12 +8,12 @@ FIND_PACKAGE(iriutils REQUIRED)
FIND_PACKAGE(comm REQUIRED)
# edit the following line to add the necessary include directories
INCLUDE_DIRECTORIES(../include/ ${iriutils_INCLUDE_DIR} ${comm_INCLUDE_DIR})
INCLUDE_DIRECTORIES(../include/ ${iriutils_INCLUDE_DIRS} ${comm_INCLUDE_DIRS})
ADD_LIBRARY(usb_i2c_adapter SHARED ${sources})
#edit the following line to add the necessary system libraries (if any)
TARGET_LINK_LIBRARIES(usb_i2c_adapter ${iriutils_LIBRARY} ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(usb_i2c_adapter ${iriutils_LIBRARIES} ${comm_LIBRARIES})
INSTALL(TARGETS usb_i2c_adapter
RUNTIME DESTINATION bin
......
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