diff --git a/Findusb_i2c_adapter.cmake b/Findusb_i2c_adapter.cmake index e94a44c394c44c28e31e13a521529879efd5b9e2..444a0a0540e87da02380c9e92b86dea29eeee850 100644 --- a/Findusb_i2c_adapter.cmake +++ b/Findusb_i2c_adapter.cmake @@ -1,20 +1,20 @@ #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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 625508968234e187627e276b1bc49e0ac3eb8bda..fd894ab0b040f5c333b65dd1a51d5e4b89280744 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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