Index: trunk/cmake-modules/FlairUseFile.cmake
===================================================================
--- trunk/cmake-modules/FlairUseFile.cmake	(revision 96)
+++ trunk/cmake-modules/FlairUseFile.cmake	(revision 97)
@@ -1,2 +1,8 @@
+if(DEFINED FLAIRUSEFILE_INCLUDED)
+    return()
+endif()
+
+SET(FLAIRUSEFILE_INCLUDED true)
+
 find_package(LibXml2 REQUIRED)
 find_package(Xenomai QUIET)
@@ -20,8 +26,6 @@
 
 #check if we have a flair-hds directory
-if (IS_DIRECTORY $ENV{FLAIR_ROOT}/flair-hds )
-	message("found flair-hds directory")
-	SET(FOUND_HDS_DIR TRUE)	
-  SET(FLAIRHDS_LIBRARY_DIR
+if (DEFINED FOUND_HDS_DIR)
+    SET(FLAIRHDS_LIBRARY_DIR
 		$ENV{FLAIR_ROOT}/flair-hds/bin/lib/${ARCH_DIR}
 	)
@@ -63,5 +67,5 @@
 IF (FLAIR_USE_VISION_FILTER)
     if(FOUND_HDS_DIR AND ("${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "armv7a-neon" OR "${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "core2-64"))
-        message("using libdspcv_gpp.a for vision filter")
+        message(${PROJECT_NAME} ": using libdspcv_gpp.a for vision filter")
 		SET(FLAIR_INCLUDE_DIR ${FLAIR_INCLUDE_DIR} $ENV{FLAIR_ROOT}/flair-hds/dev/include/VisionFilter)
 		SET(FLAIR_LIBRARIES ${FLAIRHDS_LIBRARY_DIR}/libVisionFilter.a ${FLAIRHDS_LIBRARY_DIR}/libdspcv_gpp.a ${FLAIR_LIBRARIES})
Index: trunk/cmake-modules/GlobalCmakeFlair.cmake
===================================================================
--- trunk/cmake-modules/GlobalCmakeFlair.cmake	(revision 96)
+++ trunk/cmake-modules/GlobalCmakeFlair.cmake	(revision 97)
@@ -1,7 +1,19 @@
+if(DEFINED GLOBALCMAKEFLAIR_INCLUDED)
+    return()
+endif()
+
+SET(GLOBALCMAKEFLAIR_INCLUDED true)
+
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/ColoredMessage.cmake)
+
+#check if we have a flair-hds directory
+if (IS_DIRECTORY $ENV{FLAIR_ROOT}/flair-hds )
+	info("found flair-hds directory")
+	SET(FOUND_HDS_DIR TRUE)	
+endif()
+
 if(NOT DEFINED ENV{FLAIR_ROOT})
 	message(FATAL_ERROR  "variable FLAIR_ROOT not defined")
 endif()
-
-include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/ColoredMessage.cmake)
 
 if(NOT DEFINED ENV{FLAIR_ROOT})
@@ -57,4 +69,5 @@
 #reimplement add executable to add a custom target for delivery (only on ARM)
 #delivery are read from ssh config file
+#also add a message to display architecture
 function(ADD_EXECUTABLE)
 	if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm" AND EXISTS "$ENV{HOME}/.ssh/config")
@@ -69,8 +82,8 @@
 			if(${POS} GREATER -1)
 				string(FIND ${f} "192.168." POS)#cherche addresse
-				if(${POS} GREATER 0)#garde que les adresses en 192.168.6.x
+				if(${POS} GREATER 0)#garde que les adresses en 192.168.x.x
 					string(REPLACE HostName "" ADDRESS ${f})#enleve Hostname
 					string(STRIP ${ADDRESS} ADDRESS)#enleve les espaces
-					message("adding delivery target for " ${ARGV0} " (" ${ADDRESS} ")")
+					#message("adding delivery target for " ${ARGV0} " (" ${ADDRESS} ")")
 					string(REPLACE "/" "_" TARGET_PATH ${TARGET_EXECUTABLE_OUTPUT_PATH})#les / ne sont pas acceptés
 					add_custom_target(
@@ -83,5 +96,33 @@
 		endforeach(f) 
 	endif()
-	#call original function
+
+    #call original function
 	_ADD_EXECUTABLE(${ARGV})
+
+    #add a message to display architecture
+    string(SUBSTRING ${ARGV0} 0 5 TESTNAME) #check if it is qt4 internal target
+    if(NOT ${TESTNAME} MATCHES "Qt4::")
+        add_custom_command(TARGET ${ARGV0} POST_BUILD
+            COMMENT "${ARGV0} built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture")
+    endif()
+
+    #add a dependance to FlairLibs and FlairHdsLibs if we use the top level CMakeLists.txt and we need flairlibs
+    if(TARGET FlairLibs AND DEFINED FLAIRUSEFILE_INCLUDED)
+        add_dependencies(${ARGV0} FlairLibs)
+    endif()
+    if(TARGET FlairHdsLibs AND DEFINED FLAIRUSEFILE_INCLUDED)
+        add_dependencies(${ARGV0} FlairHdsLibs)
+    endif()
 endfunction()
+
+
+#reimplement add library to add a message to display architecture
+function(ADD_LIBRARY)
+    #call original function
+	_ADD_LIBRARY(${ARGV})
+    string(SUBSTRING ${ARGV0} 0 5 TESTNAME) #check if it is qt4 internal target
+    if(NOT ${TESTNAME} MATCHES "Qt4::")
+        add_custom_command(TARGET ${ARGV0} POST_BUILD
+            COMMENT "${ARGV0} built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture")
+    endif()
+endfunction()
