From 121b345ef97f95cbc1c28328dd91fbdb72a00ed9 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@geekplace.eu>
Date: Thu, 23 Mar 2017 17:17:28 +0100
Subject: [PATCH] Run dependencyManager.sh as part of CMake

and not Make
---
 CMakeLists.txt | 1 +
 Makefile       | 9 ++-------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee6b4c54..1ff9b3f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
 message("CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
 include(doxygen)
 
+execute_process(COMMAND ${PROJECT_SOURCE_DIR}/scripts/dependencyManager.sh -v install)
 set(EIGEN3_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/external-libs/eigen)
 find_package(Eigen3 REQUIRED)
   
diff --git a/Makefile b/Makefile
index 33c8fac4..1b73736d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all clean prerequisites distclean doc full release relwithdebug reldebug debug stresstest test
+.PHONY: all clean distclean doc full release relwithdebug reldebug debug stresstest test
 
 NPROC := $(shell nproc)
 COMMON_MAKE_ARGS := -j $(NPROC) -l $(NPROC) $(MAKEFLAGS)
@@ -11,17 +11,12 @@ clean:
 	rm -f build
 	rm -rf build-*
 
-prerequisites:
-	# TODO: This should probably become a CMake custom target, just
-	# like e.g. CheckEmperVersionHeader
-	./scripts/dependencyManager.sh -v install
-
 distclean: clean
 	./scripts/dependencyManager.sh -v clean
 	./scrtipts/versionManager.sh -v clean
 	git clean -x -d -f
 
-debug release relwithdebug: prerequisites
+debug release relwithdebug:
 	[[ -d build-$@ ]] || mkdir build-$@
 	rm -f build
 	ln -rs build-$@ build
-- 
GitLab