From 50370bbefa741ef9fe7ba6eede5093a97175173a Mon Sep 17 00:00:00 2001
From: mkirsz <s1351949@sms.ed.ac.uk>
Date: Wed, 6 Mar 2024 12:13:41 +0000
Subject: [PATCH] Add download to ext proj

---
 .gitignore     |  1 +
 CMakeLists.txt | 17 +++++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index d5a1572..e6a76cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 *.swp
+*.swo
 build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c848a6d..7d58ca3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,20 +14,25 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}
     You may need to remove CMakeCache.txt and CMakeFiles dir. ")
 endif()
 
-# check required modules are present
-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../CORE")
-    message("This module requires CORE module for compilation.")
-    message(FATAL_ERROR "CORE module not found.")
-endif()
-
 include(ExternalProject)
 ExternalProject_Add(Tadah.CORE
+    GIT_REPOSITORY git@git.ecdf.ed.ac.uk:tadah/core.git
+    GIT_TAG main
     SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../CORE
+    PATCH_COMMAND  mkdir -p build
     BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../CORE/build
     INSTALL_COMMAND cmake -E echo "Skipping install step."
     )
+
+# check required modules are present
+if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../CORE")
+    message("This module requires CORE module for compilation.")
+    message(FATAL_ERROR "CORE module not found.")
+endif()
+
 link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../CORE/build)
 
+
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)
-- 
GitLab