source: pacpusframework/branches/2.0-beta1/src/PacpusTools/CMakeLists.txt@ 162

Last change on this file since 162 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
RevLine 
[89]1#################################################
2# ___________ ____ ______ __ __ _____ #
3# \____ \__ \ _/ ___\\____ \| | \/ ___/ #
4# | |_> > __ \\ \___| |_> > | /\___ \ #
5# | __(____ /\___ > __/|____//____ > #
6# |__| \/ \/|__| \/ #
7# #
8#################################################
9project(PacpusTools)
10
[162]11create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools")
12
[89]13# ========================================
14# Compiler definitions
15# ========================================
[162]16add_definitions(${QT_DEFINITIONS})
[89]17
18# ========================================
19# Include directories
20# ========================================
[162]21include_directories(${QT_INCLUDE_DIR})
22
[110]23# ========================================
24# Link directories
25# ========================================
26link_directories(
27 ${PROJECT_BINARY_DIR}/../PacpusLib
[123]28 ${PROJECT_BINARY_DIR}/../RoadTime
[110]29)
[89]30
31# ========================================
32# List of sources
33# ========================================
[162]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
[89]39 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
[162]40 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
[89]41 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
42 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/ShMem.h
43 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/pacpusStruct.h
[124]44 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
[162]45)
46
47set(PROJECT_SRCS
[89]48 ./src/matrice.cpp
49 ./src/geodesie.cpp
50 ./src/AsyncWorkerBase.cpp
51 ./src/PeriodicWorker.cpp
[124]52 #./src/PacpusSerialPort.cpp
[89]53)
54
55# ========================================
56# Files to MOC
57# ========================================
[162]58set(FILES_TO_MOC
[89]59 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
60 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
[124]61 #${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PacpusSerialPort.h
[89]62)
63
64# ========================================
65# Call MOC
66# ========================================
[140]67qt_wrap_cpp(
[89]68 PROJECT_MOC_SRCS
69 ${FILES_TO_MOC}
70)
71
72# ========================================
73# Platform specific sources
74# ========================================
75# Unix
76if(UNIX)
[140]77 list(APPEND PROJECT_SRCS
[89]78 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
79 src/PosixShMem.cpp
80 )
81endif()
82# Windows
83if(WIN32)
[140]84 list(APPEND PROJECT_SRCS
[89]85 ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
86 src/Win32ShMem.cpp
87 )
88endif()
89
90# ========================================
91# Build a library
92# ========================================
93pacpus_add_library(
[110]94 ${PROJECT_NAME} SHARED
[89]95 ${PROJECT_SRCS}
96 ${PROJECT_MOC_SRCS}
97)
98
99# ========================================
[110]100# Libraries
101# ========================================
[123]102set(OPT_LIBRARIES
[140]103 optimized PacpusLib debug PacpusLib_d
[123]104)
105
106# Windows platform
107if(WIN32)
108 LIST(APPEND OPT_LIBRARIES
109 optimized ROAD_TIME debug ROAD_TIME_d
110)
111endif()
112
[110]113target_link_libraries(
114 ${PROJECT_NAME}
115 ${QT_LIBRARIES}
116 ${PACPUS_DEPENDENCIES_LIB}
[123]117 ${OPT_LIBRARIES}
[110]118)
119
120# ========================================
[89]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.