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

Last change on this file since 63 was 58, checked in by Marek Kurdej, 12 years ago

CMake: updated to conform to the coding style.

File size: 2.7 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}/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 ./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}/Pacpus/PacpusTools/AsyncWorkerBase.h
57 ${PACPUS_INCLUDE_DIR}/Pacpus/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}/Pacpus/PacpusTools/PosixShMem.h
76 src/PosixShMem.cpp
77 )
78endif()
79# Windows
80if(WIN32)
81 list(
82 APPEND PROJECT_SRCS
83 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
84 src/Win32ShMem.cpp
85 )
86endif()
87
88# ========================================
89# Build a library
90# ========================================
91pacpus_add_library(
92 ${PROJECT_NAME}
93 ${PROJECT_SRCS}
94 ${PROJECT_MOC_SRCS}
95)
96
97# ========================================
98# Install
99# ========================================
100pacpus_install(${PROJECT_NAME})
101
102# ========================================
103# Folder
104# ========================================
105pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.