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

Last change on this file since 3 was 3, checked in by sgosseli, 12 years ago
  • Add the existing Pacpus files from pacpusdev and pacpuscore.
  • Provide a clean build system based on multiple CMake files.
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}/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)
49
50# ========================================
51# Files to MOC
52# ========================================
53set(
54 FILES_TO_MOC
55 ${PACPUS_INCLUDE_DIR}/PacpusTools/AsyncWorkerBase.h
56)
57
58# ========================================
59# Call MOC
60# ========================================
61qt4_wrap_cpp(
62 PROJECT_MOC_SRCS
63 ${FILES_TO_MOC}
64)
65
66# ========================================
67# Platform specific sources
68# ========================================
69# Unix
70if(UNIX)
71 list(
72 APPEND PROJECT_SRCS
73 ${PACPUS_INCLUDE_DIR}/PacpusTools/PosixShMem.h
74 src/PosixShMem.cpp
75 )
76endif()
77# Windows
78if(WIN32)
79 list(
80 APPEND PROJECT_SRCS
81 ${PACPUS_INCLUDE_DIR}/PacpusTools/Win32ShMem.h
82 src/Win32ShMem.cpp
83 )
84endif()
85
86# ========================================
87# Build a library
88# ========================================
89add_library(
90 ${PROJECT_NAME}
91 ${PROJECT_SRCS}
92 ${PROJECT_MOC_SRCS}
93)
94
95# ========================================
96# Properties
97# ========================================
98set_target_properties(
99 ${PROJECT_NAME}
100 PROPERTIES DEBUG_POSTFIX "_d"
101)
102
103# ========================================
104# Install directories
105# ========================================
106install(
107 TARGETS ${PROJECT_NAME}
108 RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
109 LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
110 ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
111)
Note: See TracBrowser for help on using the repository browser.