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

Last change on this file since 41 was 28, checked in by sgosseli, 12 years ago

Major: to avoid names collision with other libraries, we should include 'Pacpus/kernel/file.h' instead of 'kernel/file.h'
To work-around this patch, if you use old stuff, you can add in your cmake: include_directories(${PACPUS_INCLUDE_DIR}/Pacpus)

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}/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# Properties
99# ========================================
100set_target_properties(
101 ${PROJECT_NAME}
102 PROPERTIES DEBUG_POSTFIX "_d"
103)
104
105# ========================================
106# Install
107# ========================================
108pacpus_install(${PROJECT_NAME})
109
110# ========================================
111# Folder
112# ========================================
113pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.