From 208e22d58952b702d8ee4922ecbcc08af49a052e Mon Sep 17 00:00:00 2001
From: David Coeurjolly <david.coeurjolly@liris.cnrs.fr>
Date: Wed, 26 May 2021 12:48:55 +0200
Subject: [PATCH] Submodules added

---
 .gitmodules        | 3 +++
 README.md          | 9 ++++++++-
 src/CMakeLists.txt | 2 +-
 src/deps/cgal      | 1 +
 4 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 src/deps/cgal

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..c00635f
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "src/deps/cgal"]
+	path = src/deps/cgal
+	url = https://github.com/CGAL/cgal.git
diff --git a/README.md b/README.md
index 8c829d2..2ce3557 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,14 @@ Let us denote by SRC_DIR the root directory of the gitlab repository.
    * Boost, with components system and filesystem
    * Intel TBB
    * Qt5
-   * CGAL, with component Qt5
+
+
+For CGAL, we have added it as a git submodule. Just run:
+```
+git submodule update  --recursive --init
+```
+
+   
 
 # 3. Compile the programs
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c5e7047..eac34a8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -26,7 +26,7 @@ find_package(Boost COMPONENTS system filesystem REQUIRED)
 # ##########################################################
 # Find some packages
 
-find_package(CGAL COMPONENTS Qt5 REQUIRED) # CGAL and QT5 component
+include("${CMAKE_CURRENT_SOURCE_DIR}/deps/cgal/CGALConfig.cmake")
 if(CGAL_Qt5_FOUND)
   add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS)
 endif()
diff --git a/src/deps/cgal b/src/deps/cgal
new file mode 160000
index 0000000..e3d5fcc
--- /dev/null
+++ b/src/deps/cgal
@@ -0,0 +1 @@
+Subproject commit e3d5fccf5b9514f1c0ddcca4d417a011b5b26a9e
-- 
GitLab