source: pacpusframework/branches/2.0-beta1/src/PacpusTools/CMakeLists.txt@ 105

Last change on this file since 105 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusTools)
10
11# ========================================
12# Configure qt4
13# ========================================
14#if(QT4_FOUND)
15# set(QT_USE_QTXML true)
16# include(${QT_USE_FILE})
17#else()
18# message(ERROR "Qt4 needed")
19#endif(QT4_FOUND)
20
21# ========================================
22# Compiler definitions
23# ========================================
24add_definitions(
25 ${QT_DEFINITIONS}
26)
27
28# ========================================
29# Include directories
30# ========================================
31include_directories(
32 ${QT_INCLUDE_DIR}
33)
34
35# ========================================
36# List of sources
37# ========================================
38set(
39 PROJECT_SRCS
40 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
41 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/BinaryDecoder.h
42 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
43 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/ShMem.h
44 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/geodesie.h
45 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h
46 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/QSerialPort.h
47 ./src/matrice.cpp
48 ./src/geodesie.cpp
49 ./src/AsyncWorkerBase.cpp
50 ./src/PeriodicWorker.cpp
51 #./src/QSerialPort.cpp
52)
53
54# ========================================
55# Files to MOC
56# ========================================
57set(
58 FILES_TO_MOC
59 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
60 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
61 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/QSerialPort.h
62)
63
64# ========================================
65# Call MOC
66# ========================================
67qt5_wrap_cpp(
68 PROJECT_MOC_SRCS
69 ${FILES_TO_MOC}
70)
71
72# ========================================
73# Platform specific sources
74# ========================================
75# Unix
76if(UNIX)
77 list(
78 APPEND PROJECT_SRCS
79 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
80 src/PosixShMem.cpp
81 )
82endif()
83# Windows
84if(WIN32)
85 list(
86 APPEND PROJECT_SRCS
87 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
88 src/Win32ShMem.cpp
89 )
90endif()
91
92# ========================================
93# Build a library
94# ========================================
95pacpus_add_library(
96 ${PROJECT_NAME}
97 ${PROJECT_SRCS}
98 ${PROJECT_MOC_SRCS}
99)
100
101# ========================================
102# Install
103# ========================================
104pacpus_install(${PROJECT_NAME})
105
106# ========================================
107# Folder
108# ========================================
109pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.