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