| 1 | #################################################
|
|---|
| 2 | # ___________ ____ ______ __ __ _____ #
|
|---|
| 3 | # \____ \__ \ _/ ___\\____ \| | \/ ___/ #
|
|---|
| 4 | # | |_> > __ \\ \___| |_> > | /\___ \ #
|
|---|
| 5 | # | __(____ /\___ > __/|____//____ > #
|
|---|
| 6 | # |__| \/ \/|__| \/ #
|
|---|
| 7 | # #
|
|---|
| 8 | #################################################
|
|---|
| 9 | project(PacpusTools)
|
|---|
| 10 |
|
|---|
| 11 | create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools")
|
|---|
| 12 |
|
|---|
| 13 | ################################################################################
|
|---|
| 14 | # Compiler definitions
|
|---|
| 15 | add_definitions(${QT_DEFINITIONS})
|
|---|
| 16 |
|
|---|
| 17 | ################################################################################
|
|---|
| 18 | # DIRECTORIES
|
|---|
| 19 | include_directories(
|
|---|
| 20 | ${QT_INCLUDE_DIR}
|
|---|
| 21 | )
|
|---|
| 22 |
|
|---|
| 23 | link_directories(
|
|---|
| 24 | ${PROJECT_BINARY_DIR}/../PacpusLib
|
|---|
| 25 | ${PROJECT_BINARY_DIR}/../RoadTime
|
|---|
| 26 | )
|
|---|
| 27 |
|
|---|
| 28 | ################################################################################
|
|---|
| 29 | # FILES
|
|---|
| 30 | set(HDRS
|
|---|
| 31 | ${EXPORT_HDR}
|
|---|
| 32 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
|
|---|
| 33 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/BinaryDecoder.h
|
|---|
| 34 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/geodesie.h
|
|---|
| 35 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
|
|---|
| 36 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
|
|---|
| 37 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/SharedMemory.h
|
|---|
| 38 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
|
|---|
| 39 |
|
|---|
| 40 | #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h
|
|---|
| 41 | #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
|
|---|
| 42 | )
|
|---|
| 43 |
|
|---|
| 44 | set(SRCS
|
|---|
| 45 | src/matrice.cpp
|
|---|
| 46 | src/geodesie.cpp
|
|---|
| 47 | src/AsyncWorkerBase.cpp
|
|---|
| 48 | src/PeriodicWorker.cpp
|
|---|
| 49 | #src/PacpusSerialPort.cpp
|
|---|
| 50 | src/SharedMemory.cpp
|
|---|
| 51 | src/PosixShMem.cpp
|
|---|
| 52 | )
|
|---|
| 53 |
|
|---|
| 54 | ################################################################################
|
|---|
| 55 | # QT
|
|---|
| 56 | set(FILES_TO_MOC
|
|---|
| 57 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
|
|---|
| 58 | ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
|
|---|
| 59 | #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
|
|---|
| 60 | )
|
|---|
| 61 |
|
|---|
| 62 | qt_wrap_cpp(
|
|---|
| 63 | PROJECT_MOC_SRCS
|
|---|
| 64 | ${FILES_TO_MOC}
|
|---|
| 65 | )
|
|---|
| 66 |
|
|---|
| 67 | ################################################################################
|
|---|
| 68 | # BUILD and LINK
|
|---|
| 69 | pacpus_add_library(${PROJECT_NAME} SHARED
|
|---|
| 70 | ${HDRS}
|
|---|
| 71 | ${SRCS}
|
|---|
| 72 | ${PROJECT_MOC_SRCS}
|
|---|
| 73 | )
|
|---|
| 74 |
|
|---|
| 75 | # LIBS
|
|---|
| 76 | set(OPT_LIBRARIES
|
|---|
| 77 | optimized PacpusLib debug PacpusLib_d
|
|---|
| 78 | )
|
|---|
| 79 |
|
|---|
| 80 | if(WIN32)
|
|---|
| 81 | LIST(APPEND OPT_LIBRARIES
|
|---|
| 82 | optimized ROAD_TIME debug ROAD_TIME_d
|
|---|
| 83 | )
|
|---|
| 84 | endif()
|
|---|
| 85 |
|
|---|
| 86 | # LINK
|
|---|
| 87 | target_link_libraries(${PROJECT_NAME}
|
|---|
| 88 | ${QT_LIBRARIES}
|
|---|
| 89 | ${PACPUS_DEPENDENCIES_LIB}
|
|---|
| 90 | ${OPT_LIBRARIES}
|
|---|
| 91 | )
|
|---|
| 92 |
|
|---|
| 93 | ################################################################################
|
|---|
| 94 | # INSTALL
|
|---|
| 95 | pacpus_install(${PROJECT_NAME})
|
|---|
| 96 |
|
|---|
| 97 | ################################################################################
|
|---|
| 98 | # FOLDER
|
|---|
| 99 | pacpus_folder(${PROJECT_NAME} "libraries")
|
|---|