Commit e0b1c79d authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Adapted to CMake plural variables *_DIRS and *_LIBRARIES

parent b8f746db
#edit the following line to add the librarie's header files
FIND_PATH(lidar_lite_INCLUDE_DIR lidar_lite.h exceptions.h lidar_lite_exceptions.h /usr/local/include/iri/lidar_lite /usr/include/iri/lidar_lite)
FIND_PATH(lidar_lite_INCLUDE_DIRS lidar_lite.h exceptions.h lidar_lite_exceptions.h /usr/local/include/iri/lidar_lite /usr/include/iri/lidar_lite)
FIND_LIBRARY(lidar_lite_LIBRARY
FIND_LIBRARY(lidar_lite_LIBRARIES
NAMES lidar_lite
PATHS /usr/local/lib/iri/lidar_lite /usr/lib/iri/lidar_lite)
SET(lidar_lite_INCLUDE_DIRS ${lidar_lite_INCLUDE_DIR})
SET(lidar_lite_LIBRARIES ${lidar_lite_LIBRARY})
SET(lidar_lite_INCLUDE_DIR ${lidar_lite_INCLUDE_DIRS})
SET(lidar_lite_LIBRARY ${lidar_lite_LIBRARIES})
IF (lidar_lite_INCLUDE_DIR AND lidar_lite_LIBRARY)
IF (lidar_lite_INCLUDE_DIRS AND lidar_lite_LIBRARIES)
SET(lidar_lite_FOUND TRUE)
ENDIF (lidar_lite_INCLUDE_DIR AND lidar_lite_LIBRARY)
ENDIF (lidar_lite_INCLUDE_DIRS AND lidar_lite_LIBRARIES)
IF (lidar_lite_FOUND)
IF (NOT lidar_lite_FIND_QUIETLY)
MESSAGE(STATUS "Found lidar_lite: ${lidar_lite_LIBRARY}")
MESSAGE(STATUS "Found lidar_lite: ${lidar_lite_LIBRARIES}")
ENDIF (NOT lidar_lite_FIND_QUIETLY)
ELSE (lidar_lite_FOUND)
IF (lidar_lite_FIND_REQUIRED)
......
......@@ -12,18 +12,18 @@ FIND_PACKAGE(iriutils REQUIRED)
# add the necessary include directories
INCLUDE_DIRECTORIES(../include/)
INCLUDE_DIRECTORIES(../include/exceptions)
INCLUDE_DIRECTORIES(${usb_i2c_adapter_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${usb_i2c_adapter_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIRS})
# create the shared library
ADD_LIBRARY(lidar_lite SHARED ${sources})
# link necessary libraries
TARGET_LINK_LIBRARIES(lidar_lite ${usb_i2c_adapter_LIBRARY})
TARGET_LINK_LIBRARIES(lidar_lite ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(lidar_lite ${iriutils_LIBRARY})
TARGET_LINK_LIBRARIES(lidar_lite ${usb_i2c_adapter_LIBRARIES})
TARGET_LINK_LIBRARIES(lidar_lite ${comm_LIBRARIES})
TARGET_LINK_LIBRARIES(lidar_lite ${iriutils_LIBRARIES})
# Check G++ compiler version
include(CheckCXXCompilerFlag)
......
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