From 9b5754e5130b28f179394f38ff943b67baadfa88 Mon Sep 17 00:00:00 2001
From: Alejandro Lopez Gestoso <alopez@iri.upc.edu>
Date: Tue, 26 Feb 2019 11:34:48 +0100
Subject: [PATCH] Modified necessary files to save the headers, the library and
 all the related files on the subdirectory iri/<package_name>

---
 Findusb_i2c_adapter.cmake | 4 ++--
 src/CMakeLists.txt        | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Findusb_i2c_adapter.cmake b/Findusb_i2c_adapter.cmake
index e83fc85..28b1e57 100644
--- a/Findusb_i2c_adapter.cmake
+++ b/Findusb_i2c_adapter.cmake
@@ -1,9 +1,9 @@
 #edit the following line to add the librarie's header files
-FIND_PATH(usb_i2c_adapter_INCLUDE_DIR usb_i2c.h /usr/include/iridrivers /usr/local/include/iridrivers)
+FIND_PATH(usb_i2c_adapter_INCLUDE_DIR usb_i2c.h /usr/include/iri/usb_i2c_adapter /usr/local/include/iri/usb_i2c_adapter)
 
 FIND_LIBRARY(usb_i2c_adapter_LIBRARY
     NAMES usb_i2c_adapter
-    PATHS /usr/lib /usr/local/lib /usr/local/lib/iridrivers) 
+    PATHS /usr/lib/iri/usb_i2c_adapter /usr/local/lib /usr/local/lib/iri/usb_i2c_adapter) 
 
 IF (usb_i2c_adapter_INCLUDE_DIR AND usb_i2c_adapter_LIBRARY)
    SET(usb_i2c_adapter_FOUND TRUE)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8b8c85c..b87c910 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -17,11 +17,11 @@ TARGET_LINK_LIBRARIES(usb_i2c_adapter ${iriutils_LIBRARY} ${comm_LIBRARY})
 
 INSTALL(TARGETS usb_i2c_adapter
   RUNTIME DESTINATION bin
-  LIBRARY DESTINATION lib/iridrivers
-  ARCHIVE DESTINATION lib/iridrivers
+  LIBRARY DESTINATION lib/iri/${PROJECT_NAME}
+  ARCHIVE DESTINATION lib/iri/${PROJECT_NAME}
 )
 
-INSTALL(FILES ${headers} DESTINATION include/iridrivers)
+INSTALL(FILES ${headers} DESTINATION include/iri/${PROJECT_NAME})
 
 INSTALL(FILES ../Findusb_i2c_adapter.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
 
-- 
GitLab