Index: /trunk/CMakeLists.txt
===================================================================
--- /trunk/CMakeLists.txt	(revision 297)
+++ /trunk/CMakeLists.txt	(revision 297)
@@ -0,0 +1,19 @@
+PROJECT(Flair)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
+include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
+
+#we use external project to force lib install before compiling demos and tools
+ExternalProject_add(FlairLibs
+    SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib
+    BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/FlairLibs
+    CMAKE_ARGS  -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_CODELITE_USE_TARGETS=ON
+    CMAKE_GENERATOR "CodeLite - Unix Makefiles"
+)
+
+if (DEFINED FOUND_HDS_DIR)
+    add_subdirectory($ENV{FLAIR_ROOT}/flair-hds/src flair-hds)
+endif()
+
+add_subdirectory(${CMAKE_SOURCE_DIR}/tools)
+add_subdirectory(${CMAKE_SOURCE_DIR}/demos)
Index: /trunk/demos/CMakeLists.txt
===================================================================
--- /trunk/demos/CMakeLists.txt	(revision 297)
+++ /trunk/demos/CMakeLists.txt	(revision 297)
@@ -0,0 +1,12 @@
+PROJECT(FlairDemos)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CircleFollower/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Gps/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/HelloWorld/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/MixedReality/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/OpticalFlow/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/SimpleFleet/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Sinus/)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Skeletons/)
Index: /trunk/demos/CircleFollower/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/CircleFollower/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/CircleFollower/simulator/CMakeLists.txt	(revision 297)
@@ -10,5 +10,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	./src/main.cpp
 )
 
Index: /trunk/demos/CircleFollower/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/CircleFollower/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/CircleFollower/uav/CMakeLists.txt	(revision 297)
@@ -13,6 +13,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/CircleFollower.cpp
+	src/main.cpp
+	src/CircleFollower.cpp
 )
 
Index: /trunk/demos/Gps/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/Gps/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/Gps/simulator/CMakeLists.txt	(revision 297)
@@ -10,5 +10,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	src/main.cpp
 )
 
Index: /trunk/demos/Gps/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/Gps/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/Gps/uav/CMakeLists.txt	(revision 297)
@@ -12,6 +12,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/DemoGps.cpp
+	src/main.cpp
+	src/DemoGps.cpp
 )
 
Index: /trunk/demos/MixedReality/real/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/MixedReality/real/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/MixedReality/real/simulator/CMakeLists.txt	(revision 297)
@@ -12,5 +12,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	src/main.cpp
 )
 
Index: /trunk/demos/MixedReality/real/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/MixedReality/real/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/MixedReality/real/uav/CMakeLists.txt	(revision 297)
@@ -13,6 +13,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/CircleFollower.cpp
+	src/main.cpp
+	src/CircleFollower.cpp
 )
 
Index: /trunk/demos/MixedReality/virtual/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/MixedReality/virtual/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/MixedReality/virtual/simulator/CMakeLists.txt	(revision 297)
@@ -13,5 +13,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	src/main.cpp
 )
 
Index: /trunk/demos/MixedReality/virtual/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/MixedReality/virtual/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/MixedReality/virtual/uav/CMakeLists.txt	(revision 297)
@@ -13,6 +13,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/App.cpp
+	src/main.cpp
+	src/App.cpp
 )
 
Index: /trunk/demos/OpticalFlow/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/OpticalFlow/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/OpticalFlow/simulator/CMakeLists.txt	(revision 297)
@@ -11,5 +11,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	src/main.cpp
 )
 
Index: /trunk/demos/OpticalFlow/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/OpticalFlow/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/OpticalFlow/uav/CMakeLists.txt	(revision 297)
@@ -14,6 +14,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/DemoOpticalFlow.cpp
+	src/main.cpp
+	src/DemoOpticalFlow.cpp
 )
 
Index: /trunk/demos/PidStandalone/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/PidStandalone/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/PidStandalone/simulator/CMakeLists.txt	(revision 297)
@@ -10,5 +10,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	src/main.cpp
 )
 
Index: /trunk/demos/PidStandalone/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/PidStandalone/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/PidStandalone/uav/CMakeLists.txt	(revision 297)
@@ -12,6 +12,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/PidUav.cpp
+	src/main.cpp
+	src/PidUav.cpp
 )
 
Index: /trunk/demos/SimpleFleet/simulator/CMakeLists.txt
===================================================================
--- /trunk/demos/SimpleFleet/simulator/CMakeLists.txt	(revision 296)
+++ /trunk/demos/SimpleFleet/simulator/CMakeLists.txt	(revision 297)
@@ -10,5 +10,5 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
+	src/main.cpp
 )
 
Index: /trunk/demos/SimpleFleet/uav/CMakeLists.txt
===================================================================
--- /trunk/demos/SimpleFleet/uav/CMakeLists.txt	(revision 296)
+++ /trunk/demos/SimpleFleet/uav/CMakeLists.txt	(revision 297)
@@ -13,6 +13,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/SimpleFleet.cpp
+	src/main.cpp
+	src/SimpleFleet.cpp
 )
 
Index: /trunk/demos/Sinus/CMakeLists.txt
===================================================================
--- /trunk/demos/Sinus/CMakeLists.txt	(revision 296)
+++ /trunk/demos/Sinus/CMakeLists.txt	(revision 297)
@@ -9,8 +9,8 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/Loop.cpp
-	${CMAKE_SOURCE_DIR}/src/Sinus.cpp
-	${CMAKE_SOURCE_DIR}/src/MeanFilter.cpp
+	src/main.cpp
+	src/Loop.cpp
+	src/Sinus.cpp
+	src/MeanFilter.cpp
 )
 
Index: /trunk/demos/Skeletons/CustomReferenceAngles/CMakeLists.txt
===================================================================
--- /trunk/demos/Skeletons/CustomReferenceAngles/CMakeLists.txt	(revision 296)
+++ /trunk/demos/Skeletons/CustomReferenceAngles/CMakeLists.txt	(revision 297)
@@ -12,6 +12,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/MyApp.cpp
+	src/main.cpp
+	src/MyApp.cpp
 )
 
Index: /trunk/demos/Skeletons/CustomTorques/CMakeLists.txt
===================================================================
--- /trunk/demos/Skeletons/CustomTorques/CMakeLists.txt	(revision 296)
+++ /trunk/demos/Skeletons/CustomTorques/CMakeLists.txt	(revision 297)
@@ -12,6 +12,6 @@
 
 SET(SRC_FILES
-	${CMAKE_SOURCE_DIR}/src/main.cpp
-	${CMAKE_SOURCE_DIR}/src/MyApp.cpp
+	src/main.cpp
+	src/MyApp.cpp
 )
 
Index: /trunk/lib/CMakeLists.txt
===================================================================
--- /trunk/lib/CMakeLists.txt	(revision 297)
+++ /trunk/lib/CMakeLists.txt	(revision 297)
@@ -0,0 +1,12 @@
+PROJECT(FlairLibs)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairCore)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairFilter)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairMeta)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairSensorActuator)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairSimulator)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairVisionFilter)
+
+
Index: /trunk/lib/FlairCore/CMakeLists.txt
===================================================================
--- /trunk/lib/FlairCore/CMakeLists.txt	(revision 296)
+++ /trunk/lib/FlairCore/CMakeLists.txt	(revision 297)
@@ -28,6 +28,4 @@
 )
 
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/nrt)
 if(NOT WIN32)
@@ -36,8 +34,8 @@
 
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(FlairCore_rt compile_info)
-add_dependencies(FlairCore_nrt compile_info)
+add_dependencies(FlairCore_rt ${PROJECT_NAME}_compile_info)
+add_dependencies(FlairCore_nrt ${PROJECT_NAME}_compile_info)
Index: /trunk/lib/FlairFilter/CMakeLists.txt
===================================================================
--- /trunk/lib/FlairFilter/CMakeLists.txt	(revision 296)
+++ /trunk/lib/FlairFilter/CMakeLists.txt	(revision 297)
@@ -43,10 +43,8 @@
 INSTALL(FILES ${HEADER_FILES} DESTINATION $ENV{FLAIR_ROOT}/flair-dev/include/${PROJECT_NAME})
 
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(${PROJECT_NAME} compile_info)
+add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info)
Index: /trunk/lib/FlairMeta/CMakeLists.txt
===================================================================
--- /trunk/lib/FlairMeta/CMakeLists.txt	(revision 296)
+++ /trunk/lib/FlairMeta/CMakeLists.txt	(revision 297)
@@ -43,10 +43,8 @@
 INSTALL(FILES ${HEADER_FILES} DESTINATION $ENV{FLAIR_ROOT}/flair-dev/include/${PROJECT_NAME})
 
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(${PROJECT_NAME} compile_info)
+add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info)
Index: /trunk/lib/FlairSensorActuator/CMakeLists.txt
===================================================================
--- /trunk/lib/FlairSensorActuator/CMakeLists.txt	(revision 296)
+++ /trunk/lib/FlairSensorActuator/CMakeLists.txt	(revision 297)
@@ -30,6 +30,4 @@
 FILE(GLOB SENSOR_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
 
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-
 ADD_LIBRARY(${PROJECT_NAME}
 	${SENSOR_SRC}
@@ -45,7 +43,7 @@
 
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(${PROJECT_NAME} compile_info)
+add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info)
Index: /trunk/lib/FlairSimulator/CMakeLists.txt
===================================================================
--- /trunk/lib/FlairSimulator/CMakeLists.txt	(revision 296)
+++ /trunk/lib/FlairSimulator/CMakeLists.txt	(revision 297)
@@ -31,15 +31,13 @@
 FILE(GLOB SIMU_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
 
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/no_gl)
-add_dependencies(FlairSimulator_nogl compile_info)
+add_dependencies(FlairSimulator_nogl ${PROJECT_NAME}_compile_info)
 if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/gl)
-add_dependencies(FlairSimulator_gl compile_info)
+add_dependencies(FlairSimulator_gl ${PROJECT_NAME}_compile_info)
 endif()
Index: /trunk/lib/FlairVisionFilter/CMakeLists.txt
===================================================================
--- /trunk/lib/FlairVisionFilter/CMakeLists.txt	(revision 296)
+++ /trunk/lib/FlairVisionFilter/CMakeLists.txt	(revision 297)
@@ -31,6 +31,4 @@
 FILE(GLOB SRC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
 
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-
 ADD_LIBRARY(${PROJECT_NAME}
 	${SRC_SRC}
@@ -46,9 +44,9 @@
 
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(${PROJECT_NAME} compile_info)
+add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info)
 
 else()
Index: /trunk/tools/CMakeLists.txt
===================================================================
--- /trunk/tools/CMakeLists.txt	(revision 297)
+++ /trunk/tools/CMakeLists.txt	(revision 297)
@@ -0,0 +1,10 @@
+PROJECT(FlairTools)
+cmake_minimum_required(VERSION 2.8)
+include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Controller/DualShock3)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Controller/Mavlink)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Dbt2csv)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/VrpnBridge)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FlairGCS)
+
Index: /trunk/tools/FlairGCS/CMakeLists.txt
===================================================================
--- /trunk/tools/FlairGCS/CMakeLists.txt	(revision 296)
+++ /trunk/tools/FlairGCS/CMakeLists.txt	(revision 297)
@@ -58,5 +58,5 @@
 include_directories(
 	${CMAKE_SOURCE_DIR}/src
-	${CMAKE_SOURCE_DIR}/../../lib/FlairCore/src/unexported
+	${CMAKE_CURRENT_SOURCE_DIR}/../../lib/FlairCore/src/unexported
 	${QT_INCLUDE_DIR}
 	${CMAKE_SYSROOT}/usr/include/udt
@@ -80,10 +80,9 @@
 
 add_custom_target(
-	compile_info
+	${PROJECT_NAME}_compile_info
 	COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
 )
 
-add_dependencies(${PROJECT_NAME} compile_info)
-
+add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info)
 
 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
