Changeset 300 in pacpusframework


Ignore:
Timestamp:
Apr 8, 2014, 8:52:14 AM (11 years ago)
Author:
Marek Kurdej
Message:

Created unified SharedMemory.

Location:
trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PacpusTools/CMakeLists.txt

    r198 r300  
    1111create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools")
    1212
    13 # ========================================
     13################################################################################
    1414# Compiler definitions
    15 # ========================================
    1615add_definitions(${QT_DEFINITIONS})
    1716
    18 # ========================================
    19 # Include directories
    20 # ========================================
    21 include_directories(${QT_INCLUDE_DIR})
     17################################################################################
     18# DIRECTORIES
     19include_directories(
     20    ${QT_INCLUDE_DIR}
     21)
    2222
    23 # ========================================
    24 # Link directories
    25 # ========================================
    2623link_directories(
    2724    ${PROJECT_BINARY_DIR}/../PacpusLib
     
    2926)
    3027
    31 # ========================================
    32 # List of sources
    33 # ========================================
    34 set(PROJECT_HDRS
     28################################################################################
     29# FILES
     30set(HDRS
    3531    ${EXPORT_HDR}
    3632    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
     
    3935    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
    4036    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
    41     ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
    42     ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/ShMem.h
     37    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/SharedMemory.h
     38
    4339    #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h
    4440    #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
    4541)
    4642
    47 set(PROJECT_SRCS
    48     ./src/matrice.cpp
    49     ./src/geodesie.cpp
    50     ./src/AsyncWorkerBase.cpp
    51     ./src/PeriodicWorker.cpp
    52     #./src/PacpusSerialPort.cpp
     43set(SRCS
     44    src/matrice.cpp
     45    src/geodesie.cpp
     46    src/AsyncWorkerBase.cpp
     47    src/PeriodicWorker.cpp
     48    #src/PacpusSerialPort.cpp
     49    src/SharedMemory.cpp
    5350)
    5451
    55 # ========================================
    56 # Files to MOC
    57 # ========================================
     52################################################################################
     53# QT
    5854set(FILES_TO_MOC
    5955    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
     
    6258)
    6359
    64 # ========================================
    65 # Call MOC
    66 # ========================================
    6760qt_wrap_cpp(
    6861    PROJECT_MOC_SRCS
     
    7063)
    7164
    72 # ========================================
    73 # Platform specific sources
    74 # ========================================
    75 # Unix
    76 if(UNIX)
    77     list(APPEND PROJECT_SRCS
    78         ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
    79         src/PosixShMem.cpp
    80     )
    81 endif()
    82 # Windows
    83 if(WIN32)
    84     list(APPEND PROJECT_SRCS
    85         ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
    86         src/Win32ShMem.cpp
    87     )
    88 endif()
    89 
    90 # ========================================
    91 # Build a library
    92 # ========================================
     65################################################################################
     66# BUILD and LINK
    9367pacpus_add_library(${PROJECT_NAME} SHARED
    94     ${PROJECT_HDRS}
    95     ${PROJECT_SRCS}
     68    ${HDRS}
     69    ${SRCS}
    9670    ${PROJECT_MOC_SRCS}
    9771)
    9872
    99 # ========================================
    100 # Libraries
    101 # ========================================
     73# LIBS
    10274set(OPT_LIBRARIES
    10375    optimized PacpusLib debug PacpusLib_d
    10476)
    10577
    106 # Windows platform
    10778if(WIN32)
    10879    LIST(APPEND OPT_LIBRARIES
     
    11182endif()
    11283
    113 target_link_libraries(
    114     ${PROJECT_NAME}
     84# LINK
     85target_link_libraries(${PROJECT_NAME}
    11586    ${QT_LIBRARIES}
    11687    ${PACPUS_DEPENDENCIES_LIB}
     
    11889)
    11990
    120 # ========================================
    121 # Install
    122 # ========================================
     91################################################################################
     92# INSTALL
    12393pacpus_install(${PROJECT_NAME})
    12494
    125 # ========================================
    126 # Folder
    127 # ========================================
     95################################################################################
     96# FOLDER
    12897pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracChangeset for help on using the changeset viewer.