From f43d6b3ecd1d45f6f94b66235e6086205d078466 Mon Sep 17 00:00:00 2001
From: Antoine Lorence <antoine.lorence@insa-rennes.fr>
Date: Wed, 19 Nov 2014 11:29:54 +0100
Subject: [PATCH] [CMake] Improvements in dependency lookup

---
 CMakeLists.txt     | 2 +-
 app/CMakeLists.txt | 7 ++++++-
 lib/detiq-t        | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f502354..ab826aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 # Detiq-T is a submodule, it is built automatically before building eiimage
 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/lib/detiq-t AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/detiq-t)
 	add_subdirectory(lib/detiq-t)
-     include_directories(lib/detiq-t/ImageIn lib/detiq-t/GenericInterface)
+	include_directories(lib/detiq-t/ImageIn lib/detiq-t/GenericInterface)
 else()
 	message(FATAL_ERROR "The Detiq-T project should be cloned before excuting this compilation. "
 		"Please use 'git submodule init' and 'git submodule update' to automatically get the source "
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index f970178..0858db2 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -17,7 +17,12 @@ endif()
 
 # Find Qwt, which must be built and installed before running this compilation
 find_package(Qwt 6.0 REQUIRED)
-include_directories(${QWT_INCLUDE_DIRS})
+if(QWT_FOUND)
+	message(STATUS "Qwt library version ${QWT_VERSION_STRING}")
+	include_directories(${QWT_INCLUDE_DIRS})
+else()
+	message(FATAL_ERROR "Cannot find Qwt library. Please add the Qwt library directory to CMAKE_PREFIX_PATH.")
+endif()
 
 set(eiimage_SOURCES
      main.cpp
diff --git a/lib/detiq-t b/lib/detiq-t
index 3775c10..ac875e9 160000
--- a/lib/detiq-t
+++ b/lib/detiq-t
@@ -1 +1 @@
-Subproject commit 3775c10a581cc3b5b8ad1bcb173a944d7dcae2d0
+Subproject commit ac875e918ae41dc00c6fede23711986ca1af8a14
-- 
GitLab