source: pacpusframework/branches/0.1.x/src/PacpusTools/CMakeLists.txt@ 204

Last change on this file since 204 was 162, checked in by Marek Kurdej, 11 years ago

Update: merged changes from trunk.

  • Property svn:executable set to *
File size: 3.5 KB
Line 
1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusTools)
10
11create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools")
12
13# ========================================
14# Compiler definitions
15# ========================================
16add_definitions(${QT_DEFINITIONS})
17
18# ========================================
19# Include directories
20# ========================================
21include_directories(${QT_INCLUDE_DIR})
22
23# ========================================
24# Link directories
25# ========================================
26link_directories(
27 ${PROJECT_BINARY_DIR}/../PacpusLib
28 ${PROJECT_BINARY_DIR}/../RoadTime
29)
30
31# ========================================
32# List of sources
33# ========================================
34set(PROJECT_HDRS
35 ${EXPORT_HDR}
36 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
37 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/BinaryDecoder.h
38 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/geodesie.h
39 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
40 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
41 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
42 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/ShMem.h
43 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h
44 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
45)
46
47set(PROJECT_SRCS
48 ./src/matrice.cpp
49 ./src/geodesie.cpp
50 ./src/AsyncWorkerBase.cpp
51 ./src/PeriodicWorker.cpp
52 #./src/PacpusSerialPort.cpp
53)
54
55# ========================================
56# Files to MOC
57# ========================================
58set(FILES_TO_MOC
59 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
60 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
61 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
62)
63
64# ========================================
65# Call MOC
66# ========================================
67qt_wrap_cpp(
68 PROJECT_MOC_SRCS
69 ${FILES_TO_MOC}
70)
71
72# ========================================
73# Platform specific sources
74# ========================================
75# Unix
76if(UNIX)
77 list(APPEND PROJECT_SRCS
78 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
79 src/PosixShMem.cpp
80 )
81endif()
82# Windows
83if(WIN32)
84 list(APPEND PROJECT_SRCS
85 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
86 src/Win32ShMem.cpp
87 )
88endif()
89
90# ========================================
91# Build a library
92# ========================================
93pacpus_add_library(
94 ${PROJECT_NAME} SHARED
95 ${PROJECT_SRCS}
96 ${PROJECT_MOC_SRCS}
97)
98
99# ========================================
100# Libraries
101# ========================================
102set(OPT_LIBRARIES
103 optimized PacpusLib debug PacpusLib_d
104)
105
106# Windows platform
107if(WIN32)
108 LIST(APPEND OPT_LIBRARIES
109 optimized ROAD_TIME debug ROAD_TIME_d
110)
111endif()
112
113target_link_libraries(
114 ${PROJECT_NAME}
115 ${QT_LIBRARIES}
116 ${PACPUS_DEPENDENCIES_LIB}
117 ${OPT_LIBRARIES}
118)
119
120# ========================================
121# Install
122# ========================================
123pacpus_install(${PROJECT_NAME})
124
125# ========================================
126# Folder
127# ========================================
128pacpus_folder(${PROJECT_NAME} "libraries")
Note: See TracBrowser for help on using the repository browser.