Changeset 99 in pacpussensors for trunk/StdDbtPlayerComponents


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/StdDbtPlayerComponents
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/StdDbtPlayerComponents/CMakeLists.txt

    r94 r99  
     1#########################quick start############################################
     2#cmake ../ -G "CodeBlocks - Unix Makefiles"
     3#make
     4#make install
     5#make clean
     6################################################################################
    17project(StdDbtPlayerComponents)
    2 
    3 ################################################################################
     8set(${PROJECT_NAME}_VERSION_MAJOR 0)
     9set(${PROJECT_NAME}_VERSION_MINOR 1)
    410add_definitions( -DSTDDBTPLAYERCOMPONENTS_EXPORTS )
    511add_definitions( -DDBTPLYSICK_EXPORTS)
    612add_definitions( -DDBTPLYSICK_EXPORTS)
    7 # ========================================
    8 # Include directories
    9 # ========================================
    10 include_directories(
    11   ${PROJECT_BINARY_DIR}
    12   ${QT_INCLUDE_DIR}
     13################################################################################
     14create_export(EXPORT_HDR ${PROJECT_NAME})
     15pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
     16add_definitions (${QT_DEFINITIONS})
     17
     18find_package(Qt5Network REQUIRED)
     19################################################################################
     20# DIRECTORIES
     21include_directories(
     22    ${PROJECT_BINARY_DIR}
     23    ${QT_INCLUDE_DIR}
     24    ${PACPUS_INCLUDE_DIR}
     25    ${PACPUS_INCLUDE_DIR}/Pacpus/
    1326)
    1427
     
    1629# Link directories
    1730# ========================================
    18 link_directories( ${PACPUS_LIB_DIR}
    19 )
    20 
    21 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
    22 
    23 set(HDRS
    24         StdDbtPlayerComponentsConfig.h
    25     DbtPlySickLMSManager.h
    26     DbtPlySickLDMRSManager.h
     31link_directories(
     32        ${PACPUS_LIB_DIR}
    2733)
    2834
    2935
    30 # ========================================
    31 # List of sources
    32 # ========================================
    33 set(
    34     PROJECT_SRCS
     36################################################################################
     37# FILES
     38set(PROJECT_HDRS
     39    ${EXPORT_HDR}
     40    StdDbtPlayerComponentsConfig.h
     41    DbtPlySickLMSManager.h
     42    DbtPlySickLDMRSManager.h
     43    ${PROJECT_NAME}.xml
     44    ${PROJECT_NAME}_d.xml
     45)
     46set(PROJECT_SRCS
     47    ${PLUGIN_CPP}
    3548    DbtPlySickLMSManager.cpp
    36     DbtPlySickLDMRSManager.cpp
    37         ${HDRS}
    38     ${PLUGIN_CPP}
     49    DbtPlySickLDMRSManager.cpp 
    3950)
    4051
    41 # ========================================
    42 # Files to MOC
    43 # ========================================
    44 set(
    45     FILES_TO_MOC
     52set(FILES_TO_MOC
     53    ${PLUGIN_HDR}
    4654    DbtPlySickLMSManager.h
    47     DbtPlySickLDMRSManager.h
    48         ${PLUGIN_H}
    49         )   
    50 
    51 
    52 set(
    53     UI_FILES
    54 
     55    DbtPlySickLDMRSManager.h
    5556)
    5657
    57 # ========================================
    58 # Call MOC
    59 # ========================================
    60 qt_wrap_cpp(
    61     PROJECT_MOC_SRCS
     58set(UI_FILES
     59)
     60
     61################################################################################
     62# Qt: call moc, uic
     63qt_wrap_cpp(PROJECT_MOC_SRCS
    6264    ${FILES_TO_MOC}
    6365)
    6466
    65 qt_wrap_ui(
    66     PROJECT_UI_SRCS
     67qt_wrap_ui(PROJECT_UI_SRCS
    6768    ${UI_FILES}
    6869)
    6970
    70 # ========================================
    71 # Build a library
    72 # ========================================
    73 pacpus_add_library(
    74     ${PROJECT_NAME} SHARED
     71################################################################################
     72# BUILD and LINK
     73pacpus_add_library(${PROJECT_NAME} SHARED
     74    ${PROJECT_HDRS}
    7575    ${PROJECT_SRCS}
    7676    ${PROJECT_MOC_SRCS}
     
    7878)
    7979
     80
     81# ========================================
     82# Libraries
     83# ========================================
    8084set(LIBS
    8185    optimized FileLib debug FileLib_d
     
    8892    )
    8993endif()
     94# LINK
     95target_link_libraries(${PROJECT_NAME}
     96                      ${PACPUS_LIBRARIES}
     97                      ${PACPUS_DEPENDENCIES_LIB}
     98                      ${LIBS}
     99                      ${QT_LIBRARIES}
     100                     )
     101qt5_use_modules(${PROJECT_NAME} Network)
     102################################################################################
     103# FOLDERS
     104pacpus_folder(${PROJECT_NAME} "components")
     105################################################################################
     106# INSTALL
     107pacpus_install(${PROJECT_NAME})
    90108
    91 # ========================================
    92 # Libraries
    93 # ========================================
    94 # All the platform
    95 target_link_libraries(
    96     ${PROJECT_NAME}
    97     ${PACPUS_LIBRARIES}
    98     ${QT_LIBRARIES}
    99         ${PACPUS_DEPENDENCIES_LIB}
    100         ${LIBS}
     109# install headers
     110install(
     111    DIRECTORY
     112        ${StdDbtPlayerComponents_SOURCE_DIR}
     113    DESTINATION
     114        ${PACPUS_INSTALL_DIR}/include
     115    FILES_MATCHING PATTERN "*.h"
    101116)
    102 
    103 pacpus_folder(${PROJECT_NAME} "components")
    104 
    105 # ========================================
    106 # Install
    107 # ========================================
    108 pacpus_install(${PROJECT_NAME})
  • trunk/StdDbtPlayerComponents/DbtPlySickLDMRSManager.h

    r50 r99  
    55//  author:     Cyril Fougeray
    66//              Copyright Heudiasyc UMR UTC/CNRS 6599
    7 // 
     7//
    88//  version:    $Id: $
    99//
    10 //  purpose:   
     10//  purpose:
    1111// *********************************************************************
    1212
     
    2929#   endif
    3030#else
    31     // On other platforms, simply ignore this 
    32 #   define DBTPLYSICK_API 
     31    // On other platforms, simply ignore this
     32#   define DBTPLYSICK_API
    3333#endif
    3434
    3535namespace pacpus {
    36    
     36
    3737class ShMem;
    3838
     
    6464} // namespace pacpus
    6565
    66 #endif 
     66#endif
  • trunk/StdDbtPlayerComponents/StdDbtPlayerComponentsConfig.h

    r16 r99  
    1 #ifndef __STDDBTPLAYERCOMPONENTS_H__
    2 #define __STDDBTPLAYERCOMPONENTS_H__
     1// Autogenerated file by PacpusUtilities.cmake
     2// DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE
    33
    4 // Export macro for CanGateway DLL for Windows only
     4#ifndef __STDDBTPLAYERCOMPONENTS_CONFIG_H__
     5#define __STDDBTPLAYERCOMPONENTS_CONFIG_H__
     6
     7// Export macro for use DLL for Windows only
    58#ifdef WIN32
    6 #   ifdef STDDBTPLAYERCOMPONENTS_EXPORTS
    7         // make DLL
    8 #       define STDDBTPLAYERCOMPONENTS_API __declspec(dllexport)
    9 #   else
    10         // use DLL
    11 #       define STDDBTPLAYERCOMPONENTS_API __declspec(dllimport)
    12 #   endif
     9   #ifdef STDDBTPLAYERCOMPONENTS_EXPORTS
     10//      make DLL
     11       #define STDDBTPLAYERCOMPONENTS_API __declspec(dllexport)
     12   #else
     13//      use DLL
     14       #define STDDBTPLAYERCOMPONENTS_API __declspec(dllimport)
     15   #endif
    1316#else
    14     // On other platforms, simply ignore this
    15 #   define STDDBTPLAYERCOMPONENTS_API
     17//      On other platforms, simply ignore this
     18   #define STDDBTPLAYERCOMPONENTS_API
    1619#endif
    1720
    18 #endif
     21#endif // __STDDBTPLAYERCOMPONENTS_CONFIG_H__
Note: See TracChangeset for help on using the changeset viewer.