source: pacpusframework/trunk/src/PacpusTools/CMakeLists.txt@ 11

Last change on this file since 11 was 10, checked in by sgosseli, 12 years ago

Add PeriodWorker and provide an example in the documentation.

File size: 2.8 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusTools)
10
11# ========================================
12# Configure qt4
13# ========================================
14if(QT4_FOUND)
15 set(QT_USE_QTXML true)
16 include(${QT_USE_FILE})
17else()
18 message(ERROR "Qt4 needed")
19endif(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}/PacpusTools/matrice.h
41 ${PACPUS_INCLUDE_DIR}/PacpusTools/BinaryDecoder.h
42 ${PACPUS_INCLUDE_DIR}/PacpusTools/PosixShMem.h
43 ${PACPUS_INCLUDE_DIR}/PacpusTools/ShMem.h
44 ${PACPUS_INCLUDE_DIR}/PacpusTools/geodesie.h
45 ./src/matrice.cpp
46 ./src/geodesie.cpp
47 ./src/AsyncWorkerBase.cpp
48 ./src/PeriodicWorker.cpp
49)
50
51# ========================================
52# Files to MOC
53# ========================================
54set(
55 FILES_TO_MOC
56 ${PACPUS_INCLUDE_DIR}/PacpusTools/AsyncWorkerBase.h
57 ${PACPUS_INCLUDE_DIR}/PacpusTools/PeriodicWorker.h
58)
59
60# ========================================
61# Call MOC
62# ========================================
63qt4_wrap_cpp(
64 PROJECT_MOC_SRCS
65 ${FILES_TO_MOC}
66)
67
68# ========================================
69# Platform specific sources
70# ========================================
71# Unix
72if(UNIX)
73 list(
74 APPEND PROJECT_SRCS
75 ${PACPUS_INCLUDE_DIR}/PacpusTools/PosixShMem.h
76 src/PosixShMem.cpp
77 )
78endif()
79# Windows
80if(WIN32)
81 list(
82 APPEND PROJECT_SRCS
83 ${PACPUS_INCLUDE_DIR}/PacpusTools/Win32ShMem.h
84 src/Win32ShMem.cpp
85 )
86endif()
87
88# ========================================
89# Build a library
90# ========================================
91add_library(
92 ${PROJECT_NAME}
93 ${PROJECT_SRCS}
94 ${PROJECT_MOC_SRCS}
95)
96
97# ========================================
98# Properties
99# ========================================
100set_target_properties(
101 ${PROJECT_NAME}
102 PROPERTIES DEBUG_POSTFIX "_d"
103)
104
105# ========================================
106# Install directories
107# ========================================
108install(
109 TARGETS ${PROJECT_NAME}
110 RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
111 LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
112 ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
113)
Note: See TracBrowser for help on using the repository browser.