Changeset 99 in pacpussensors for trunk/Dualshock
- Timestamp:
- Oct 15, 2015, 2:47:01 PM (9 years ago)
- Location:
- trunk/Dualshock
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Dualshock/CMakeLists.txt
r21 r99 1 project(Dualshock) 1 #########################quick start################################## 2 #cmake ../ -G "CodeBlocks - Unix Makefiles" 3 #make 4 #make install 5 #make clean 2 6 ################################################################################ 7 project(TestDualShock) 3 8 add_definitions( -DDUALSHOCKXT_EXPORTS ) 4 5 # ======================================== 6 # Configure qt4 7 # ======================================== 8 if(QT4_FOUND) 9 set(QT_USE_QTXML true) 10 set(QT_USE_QTNETWORK true) 11 include(${QT_USE_FILE}) 12 else() 13 message(ERROR "Qt4 needed") 14 endif() 15 16 # ======================================== 17 # Compiler definitions 18 # ======================================== 19 add_definitions( 20 ${QT_DEFINITIONS} 21 ) 22 23 # ======================================== 24 # Include directories 25 # ======================================== 9 set(${PROJECT_NAME}_VERSION_MAJOR 0) 10 set(${PROJECT_NAME}_VERSION_MINOR 1) 11 ################################################################################ 12 create_export(EXPORT_HDR ${PROJECT_NAME}) 13 pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME}) 14 ################################################################################ 15 # DIRECTORIES 26 16 include_directories( 27 ${PROJECT_BINARY_DIR} 28 ${QT_INCLUDE_DIR} 17 ${PROJECT_BINARY_DIR} 18 ${QT_INCLUDE_DIR} 19 ${PACPUS_INCLUDE_DIR} 20 ${PACPUS_INCLUDE_DIR}/Pacpus/ 29 21 ) 30 22 … … 32 24 # Link directories 33 25 # ======================================== 34 link_directories( ${PACPUS_LIB_DIR} 26 link_directories( 27 ${PACPUS_LIB_DIR} 35 28 ) 36 29 37 message (STATUS ${PACPUS_LIB_DIR})38 30 39 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 40 41 # ======================================== 42 # List of sources 43 # ======================================== 44 set( 45 PROJECT_SRCS 46 controller.cpp 47 dualshock.cpp 31 ################################################################################ 32 # FILES 33 set(PROJECT_HDRS 34 ${EXPORT_HDR} 35 dualshock.h 36 controller.h 37 xml/${PROJECT_NAME}.xml 38 xml/${PROJECT_NAME}_d.xml 39 ) 40 set(PROJECT_SRCS 48 41 ${PLUGIN_CPP} 42 dualshock.cpp 43 controller.cpp 49 44 ) 50 45 51 # ======================================== 52 # Files to MOC 53 # ======================================== 54 set( 55 FILES_TO_MOC 56 controller.h 57 dualshock.h 58 ${PLUGIN_H} 46 set(FILES_TO_MOC 47 ${PLUGIN_HDR} 48 controller.h 59 49 ) 60 50 61 set( 62 UI_FILES 63 51 set(UI_FILES 64 52 ) 65 53 66 # ======================================== 67 # Call MOC 68 # ======================================== 69 qt4_wrap_cpp( 70 PROJECT_MOC_SRCS 54 ################################################################################ 55 # Qt: call moc, uic 56 qt_wrap_cpp(PROJECT_MOC_SRCS 71 57 ${FILES_TO_MOC} 72 58 ) 73 59 74 qt4_wrap_ui( 75 PROJECT_UI_SRCS 60 qt_wrap_ui(PROJECT_UI_SRCS 76 61 ${UI_FILES} 77 62 ) 78 63 79 # ======================================== 80 # Build a library 81 # ======================================== 82 pacpus_add_library( 83 ${PROJECT_NAME} SHARED 64 ################################################################################ 65 # BUILD and LINK 66 pacpus_add_library(${PROJECT_NAME} SHARED 67 ${PROJECT_HDRS} 84 68 ${PROJECT_SRCS} 85 69 ${PROJECT_MOC_SRCS} … … 87 71 ) 88 72 89 message(STATUS ${PACPUS_DEPENDENCIES_LIB} )90 73 91 74 # ======================================== 92 75 # Libraries 93 76 # ======================================== 94 # All the platform 95 target_link_libraries( 96 ${PROJECT_NAME} 97 ${PACPUS_LIBRARIES} 98 ${QT_LIBRARIES} 99 ${PACPUS_DEPENDENCIES_LIB} 100 PacpusTools 77 set(LIBS 78 optimized FileLib debug FileLib_d 79 optimized PacpusLib debug PacpusLib_d 80 optimized PacpusTools debug PacpusTools_d 101 81 ) 82 if (WIN32) 83 list(APPEND LIBS 84 optimized ROAD_TIME debug ROAD_TIME_d 85 ) 86 endif() 102 87 103 # ======================================== 104 # Install 105 # ======================================== 106 pacpus_install(${PROJECT_NAME}) 88 # LINK 89 target_link_libraries(${PROJECT_NAME} 90 ${PACPUS_LIBRARIES} 91 ${PACPUS_DEPENDENCIES_LIB} 92 ${LIBS}) 107 93 94 ################################################################################ 95 # FOLDERS 96 pacpus_folder(${PROJECT_NAME} "components") 97 98 ################################################################################ 99 # INSTALL 100 pacpus_install(${PROJECT_NAME}) -
trunk/Dualshock/controller.h
r22 r99 24 24 # include <QThread> 25 25 26 # include "kernel/ComponentBase.h"27 # include "kernel/DbiteFile.h"28 # include "kernel/DbiteFileTypes.h"29 # include "PacpusTools/ShMem.h"26 # include <kernel/ComponentBase.h> 27 # include <kernel/DbiteFile.h> 28 # include <kernel/DbiteFileTypes.h> 29 # include <PacpusTools/ShMem.h> 30 30 31 31 # define L2CAP_PSM_HIDP_CTRL 0x11 -
trunk/Dualshock/dualshock.h
r22 r99 15 15 # define DUALSHOCK_H 16 16 17 # include "kernel/ComponentBase.h"18 # include "kernel/DbiteFile.h"17 # include <kernel/ComponentBase.h> 18 # include <kernel/DbiteFile.h> 19 19 # include "controller.h" 20 20
Note:
See TracChangeset
for help on using the changeset viewer.