Changeset 99 in pacpussensors for trunk/Dualshock


Ignore:
Timestamp:
Oct 15, 2015, 2:47:01 PM (9 years ago)
Author:
nguyenhu
Message:

compilation under linux with 0.2.X framework

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
    26################################################################################
     7project(TestDualShock)
    38add_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 # ========================================
     9set(${PROJECT_NAME}_VERSION_MAJOR 0)
     10set(${PROJECT_NAME}_VERSION_MINOR 1)
     11################################################################################
     12create_export(EXPORT_HDR ${PROJECT_NAME})
     13pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
     14################################################################################
     15# DIRECTORIES
    2616include_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/
    2921)
    3022
     
    3224# Link directories
    3325# ========================================
    34 link_directories( ${PACPUS_LIB_DIR}
     26link_directories(
     27        ${PACPUS_LIB_DIR}
    3528)
    3629
    37 message (STATUS ${PACPUS_LIB_DIR})
    3830
    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
     33set(PROJECT_HDRS
     34    ${EXPORT_HDR}
     35    dualshock.h
     36    controller.h
     37    xml/${PROJECT_NAME}.xml
     38    xml/${PROJECT_NAME}_d.xml
     39)
     40set(PROJECT_SRCS
    4841    ${PLUGIN_CPP}
     42    dualshock.cpp
     43    controller.cpp
    4944)
    5045
    51 # ========================================
    52 # Files to MOC
    53 # ========================================
    54 set(
    55     FILES_TO_MOC
    56     controller.h
    57     dualshock.h
    58     ${PLUGIN_H}
     46set(FILES_TO_MOC
     47    ${PLUGIN_HDR}
     48    controller.h
    5949)
    6050
    61 set(
    62     UI_FILES
    63 
     51set(UI_FILES
    6452)
    6553
    66 # ========================================
    67 # Call MOC
    68 # ========================================
    69 qt4_wrap_cpp(
    70     PROJECT_MOC_SRCS
     54################################################################################
     55# Qt: call moc, uic
     56qt_wrap_cpp(PROJECT_MOC_SRCS
    7157    ${FILES_TO_MOC}
    7258)
    7359
    74 qt4_wrap_ui(
    75     PROJECT_UI_SRCS
     60qt_wrap_ui(PROJECT_UI_SRCS
    7661    ${UI_FILES}
    7762)
    7863
    79 # ========================================
    80 # Build a library
    81 # ========================================
    82 pacpus_add_library(
    83     ${PROJECT_NAME} SHARED
     64################################################################################
     65# BUILD and LINK
     66pacpus_add_library(${PROJECT_NAME} SHARED
     67    ${PROJECT_HDRS}
    8468    ${PROJECT_SRCS}
    8569    ${PROJECT_MOC_SRCS}
     
    8771)
    8872
    89 message(STATUS  ${PACPUS_DEPENDENCIES_LIB} )
    9073
    9174# ========================================
    9275# Libraries
    9376# ========================================
    94 # All the platform
    95 target_link_libraries(
    96     ${PROJECT_NAME}
    97     ${PACPUS_LIBRARIES}
    98     ${QT_LIBRARIES}
    99         ${PACPUS_DEPENDENCIES_LIB}
    100         PacpusTools
     77set(LIBS
     78    optimized FileLib debug FileLib_d
     79    optimized PacpusLib debug PacpusLib_d
     80    optimized PacpusTools debug PacpusTools_d
    10181)
     82if (WIN32)
     83    list(APPEND LIBS
     84        optimized ROAD_TIME debug ROAD_TIME_d
     85    )
     86endif()
    10287
    103 # ========================================
    104 # Install
    105 # ========================================
    106 pacpus_install(${PROJECT_NAME})
     88# LINK
     89target_link_libraries(${PROJECT_NAME}
     90                      ${PACPUS_LIBRARIES}
     91                      ${PACPUS_DEPENDENCIES_LIB}
     92                      ${LIBS})
    10793
     94################################################################################
     95# FOLDERS
     96pacpus_folder(${PROJECT_NAME} "components")
     97
     98################################################################################
     99# INSTALL
     100pacpus_install(${PROJECT_NAME})
  • trunk/Dualshock/controller.h

    r22 r99  
    2424# include <QThread>
    2525
    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>
    3030
    3131# define L2CAP_PSM_HIDP_CTRL 0x11
  • trunk/Dualshock/dualshock.h

    r22 r99  
    1515# define DUALSHOCK_H
    1616
    17 # include "kernel/ComponentBase.h"
    18 # include "kernel/DbiteFile.h"
     17# include <kernel/ComponentBase.h>
     18# include <kernel/DbiteFile.h>
    1919# include "controller.h"
    2020
Note: See TracChangeset for help on using the changeset viewer.