From 569d00875059aa1008d273899a5df8b512f3084d Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Tue, 5 Sep 2023 16:20:00 +0200
Subject: [PATCH] Modified the CMakeFile.txt to include the external repository
 for the rapidcsv library and install the necessary files.

---
 src/CMakeLists.txt | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 502ceab..4f0245e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,8 +9,18 @@ SET(headers ../include/kf_based_terrain_analysis.h
             ../include/structs_definitions.h 
             ../include/time_supervisor.h
             ../include/observation_downsampler.h
-            ../include/shallow_neural_net.h)
-            
+            ../include/shallow_neural_net.h
+            ${CMAKE_CURRENT_LIST_DIR}/../rapidcsv/src/rapidcsv.h)
+
+
+include(FetchContent)
+FetchContent_Declare(rapidcsv
+  GIT_REPOSITORY "https://github.com/d99kris/rapidcsv.git"
+  GIT_TAG "origin/master"
+  SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../rapidcsv"
+)
+FetchContent_MakeAvailable(rapidcsv)
+
 # locate the necessary dependencies
 FIND_PACKAGE(catkin REQUIRED COMPONENTS roscpp)
 FIND_PACKAGE(PCL REQUIRED COMPONENTS common)
@@ -19,6 +29,7 @@ FIND_PACKAGE(PCL REQUIRED COMPONENTS common)
 INCLUDE_DIRECTORIES(../include)
 INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS})
 INCLUDE_DIRECTORIES(${catkin_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/../rapidcsv/src)
 
 # create the shared library
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${sources})
-- 
GitLab