source: pacpusframework/branches/0.0.x/src/PacpusTools/CMakeLists.txt@ 255

Last change on this file since 255 was 103, checked in by DHERBOMEZ Gérald, 11 years ago

Correction of link bugs.
Windows build OK.

  • Property svn:keywords set to Id
File size: 3.1 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 -DPACPUSTOOLS_EXPORTS
26 ${QT_DEFINITIONS}
27)
28
29# ========================================
30# Include directories
31# ========================================
32include_directories(
33 ${QT_INCLUDE_DIR}
34)
35
36# ========================================
37# List of sources
38# ========================================
39set(
40 PROJECT_SRCS
41 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
42 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/BinaryDecoder.h
43 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
44 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/ShMem.h
45 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/geodesie.h
46 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
47 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
48 ./src/matrice.cpp
49 ./src/geodesie.cpp
50 ./src/AsyncWorkerBase.cpp
51 ./src/PeriodicWorker.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)
62
63# ========================================
64# Call MOC
65# ========================================
66qt4_wrap_cpp(
67 PROJECT_MOC_SRCS
68 ${FILES_TO_MOC}
69)
70
71# ========================================
72# Platform specific sources
73# ========================================
74# Unix
75if(UNIX)
76 list(
77 APPEND PROJECT_SRCS
78 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
79 src/PosixShMem.cpp
80 )
81endif()
82# Windows
83if(WIN32)
84 list(
85 APPEND PROJECT_SRCS
86 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
87 src/Win32ShMem.cpp
88 )
89endif()
90
91# ========================================
92# Build a library
93# ========================================
94pacpus_add_library(
95 ${PROJECT_NAME} SHARED
96 ${PROJECT_SRCS}
97 ${PROJECT_MOC_SRCS}
98)
99
100# ========================================
101# Libraries
102# ========================================
103target_link_libraries(
104 ${PROJECT_NAME}
105 ${QT_LIBRARIES}
106 ${PACPUS_DEPENDENCIES_LIB}
107 PacpusLib
108)
109
110
111# ========================================
112# Install
113# ========================================
114pacpus_install(${PROJECT_NAME})
115
116# ========================================
117# Folder
118# ========================================
119pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.