Index: trunk/Dualshock/CMakeLists.txt
===================================================================
--- trunk/Dualshock/CMakeLists.txt	(revision 21)
+++ trunk/Dualshock/CMakeLists.txt	(revision 99)
@@ -1,30 +1,22 @@
-project(Dualshock)
+#########################quick start##################################
+#cmake ../ -G "CodeBlocks - Unix Makefiles"
+#make
+#make install
+#make clean
 ################################################################################
+project(TestDualShock)
 add_definitions( -DDUALSHOCKXT_EXPORTS )
-
-# ========================================
-# Configure qt4
-# ========================================
-if(QT4_FOUND)
-  set(QT_USE_QTXML true)
-  set(QT_USE_QTNETWORK true)
-  include(${QT_USE_FILE})
-else()
-  message(ERROR "Qt4 needed")
-endif()
-
-# ========================================
-# Compiler definitions
-# ========================================
-add_definitions(
-  ${QT_DEFINITIONS}
-)
-
-# ========================================
-# Include directories
-# ========================================
+set(${PROJECT_NAME}_VERSION_MAJOR 0)
+set(${PROJECT_NAME}_VERSION_MINOR 1)
+################################################################################
+create_export(EXPORT_HDR ${PROJECT_NAME})
+pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
+################################################################################
+# DIRECTORIES
 include_directories(
-  ${PROJECT_BINARY_DIR}
-  ${QT_INCLUDE_DIR}
+    ${PROJECT_BINARY_DIR}
+    ${QT_INCLUDE_DIR}
+    ${PACPUS_INCLUDE_DIR}
+    ${PACPUS_INCLUDE_DIR}/Pacpus/
 )
 
@@ -32,54 +24,46 @@
 # Link directories
 # ========================================
-link_directories( ${PACPUS_LIB_DIR}
+link_directories( 
+	${PACPUS_LIB_DIR}
 )
 
-message (STATUS ${PACPUS_LIB_DIR})
 
-pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
-
-# ========================================
-# List of sources
-# ========================================
-set(
-    PROJECT_SRCS
-    controller.cpp
-    dualshock.cpp
+################################################################################
+# FILES
+set(PROJECT_HDRS
+    ${EXPORT_HDR}
+    dualshock.h 
+    controller.h 
+    xml/${PROJECT_NAME}.xml
+    xml/${PROJECT_NAME}_d.xml
+)
+set(PROJECT_SRCS
     ${PLUGIN_CPP}
+    dualshock.cpp 
+    controller.cpp 
 )
 
-# ========================================
-# Files to MOC
-# ========================================
-set(
-    FILES_TO_MOC
-    controller.h
-    dualshock.h
-    ${PLUGIN_H}
+set(FILES_TO_MOC
+    ${PLUGIN_HDR}
+    controller.h 
 )
 
-set(
-    UI_FILES
-
+set(UI_FILES
 )
 
-# ========================================
-# Call MOC
-# ========================================
-qt4_wrap_cpp(
-    PROJECT_MOC_SRCS
+################################################################################
+# Qt: call moc, uic
+qt_wrap_cpp(PROJECT_MOC_SRCS
     ${FILES_TO_MOC}
 )
 
-qt4_wrap_ui(
-    PROJECT_UI_SRCS
+qt_wrap_ui(PROJECT_UI_SRCS
     ${UI_FILES}
 )
 
-# ========================================
-# Build a library
-# ========================================
-pacpus_add_library(
-    ${PROJECT_NAME} SHARED
+################################################################################
+# BUILD and LINK
+pacpus_add_library(${PROJECT_NAME} SHARED
+    ${PROJECT_HDRS}
     ${PROJECT_SRCS}
     ${PROJECT_MOC_SRCS}
@@ -87,21 +71,30 @@
 )
 
-message(STATUS  ${PACPUS_DEPENDENCIES_LIB} ) 
 
 # ========================================
 # Libraries
 # ========================================
-# All the platform
-target_link_libraries(
-    ${PROJECT_NAME}
-    ${PACPUS_LIBRARIES}
-    ${QT_LIBRARIES}
-	${PACPUS_DEPENDENCIES_LIB}
-	PacpusTools
+set(LIBS
+    optimized FileLib debug FileLib_d
+    optimized PacpusLib debug PacpusLib_d
+    optimized PacpusTools debug PacpusTools_d
 )
+if (WIN32)
+    list(APPEND LIBS
+        optimized ROAD_TIME debug ROAD_TIME_d
+    )
+endif()
 
-# ========================================
-# Install
-# ========================================
-pacpus_install(${PROJECT_NAME})
+# LINK 
+target_link_libraries(${PROJECT_NAME} 
+		      ${PACPUS_LIBRARIES} 
+	              ${PACPUS_DEPENDENCIES_LIB} 
+                      ${LIBS})
 
+################################################################################
+# FOLDERS
+pacpus_folder(${PROJECT_NAME} "components")
+
+################################################################################
+# INSTALL
+pacpus_install(${PROJECT_NAME}) 
