File: 01_Add_CMakeLists.patch

package info (click to toggle)
qcustomplot 2.0.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,136 kB
  • sloc: cpp: 21,744; sh: 165; makefile: 2
file content (162 lines) | stat: -rw-r--r-- 6,374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Description: Add CMakeLists files for building of shared library and to examples
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2018-01-30

Index: qcustomplot/CMakeLists.txt
===================================================================
--- /dev/null
+++ qcustomplot/CMakeLists.txt
@@ -0,0 +1,29 @@
+PROJECT(qcustomplot CXX)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+SET(Q_MAJOR_VERSION "2")
+SET(Q_MINOR_VERSION "0")
+SET(Q_PATCH_VERSION "1")
+
+INCLUDE(GNUInstallDirs)
+FIND_PACKAGE(Qt5Widgets REQUIRED)
+FIND_PACKAGE(Qt5PrintSupport REQUIRED)
+INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS} /usr/include/qt5/QtPrintSupport)
+ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS} -DQCUSTOMPLOT_COMPILE_LIBRARY)
+SET(CMAKE_AUTOMOC ON)
+
+
+set(Q_VERSION "${Q_MAJOR_VERSION}.${Q_MINOR_VERSION}.${Q_PATCH_VERSION}")
+set(Q_SOVERSION "${Q_MAJOR_VERSION}.${Q_MINOR_VERSION}")
+
+ADD_LIBRARY(qcustomplot SHARED qcustomplot.cpp)
+QT5_USE_MODULES(qcustomplot Widgets)
+
+SET_TARGET_PROPERTIES(qcustomplot PROPERTIES 
+  VERSION ${Q_VERSION}
+  SOVERSION ${Q_SOVERSION})
+TARGET_LINK_LIBRARIES(qcustomplot ${Qt5Widgets_LIBRARIES} Qt5::PrintSupport)
+
+INSTALL(TARGETS qcustomplot DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+INSTALL(FILES qcustomplot.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+INSTALL(FILES cmake/QCustomPlotConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/QCustomPlot)
Index: qcustomplot/examples/interactions/CMakeLists.txt
===================================================================
--- /dev/null
+++ qcustomplot/examples/interactions/CMakeLists.txt
@@ -0,0 +1,20 @@
+project(interactions CXX)
+cmake_minimum_required(VERSION 2.8)
+
+FIND_PACKAGE(QCustomPlot REQUIRED)
+FIND_PACKAGE(Qt5PrintSupport REQUIRED)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
+
+INCLUDE(GNUInstallDirs)
+FIND_PACKAGE(Qt5Widgets REQUIRED)
+INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QCustomPlot_INCLUDE_DIR})
+ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS} -DQCUSTOMPLOT_USE_LIBRARY)
+SET(CMAKE_AUTOMOC ON)
+
+QT5_WRAP_UI(UI_HEADERS mainwindow.ui)
+ADD_EXECUTABLE(interactions main.cpp mainwindow.cpp ${UI_HEADERS})
+QT5_USE_MODULES(interactions Widgets)
+
+TARGET_LINK_LIBRARIES(interactions ${Qt5Widgets_LIBRARIES} ${QCustomPlot_LIBRARIES} Qt5::PrintSupport)
+INSTALL(TARGETS interactions DESTINATION ${CMAKE_INSTALL_BINDIR})
Index: qcustomplot/examples/plots/CMakeLists.txt
===================================================================
--- /dev/null
+++ qcustomplot/examples/plots/CMakeLists.txt
@@ -0,0 +1,20 @@
+project(plots CXX)
+cmake_minimum_required(VERSION 2.8)
+
+FIND_PACKAGE(QCustomPlot REQUIRED)
+FIND_PACKAGE(Qt5PrintSupport REQUIRED)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
+
+INCLUDE(GNUInstallDirs)
+FIND_PACKAGE(Qt5Widgets REQUIRED)
+INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QCustomPlot_INCLUDE_DIR})
+ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS} -DQCUSTOMPLOT_USE_LIBRARY)
+SET(CMAKE_AUTOMOC ON)
+
+QT5_WRAP_UI(UI_HEADERS mainwindow.ui)
+ADD_EXECUTABLE(plots main.cpp mainwindow.cpp ${UI_HEADERS})
+QT5_USE_MODULES(plots Widgets)
+
+TARGET_LINK_LIBRARIES(plots ${Qt5Widgets_LIBRARIES} ${QCustomPlot_LIBRARIES} Qt5::PrintSupport)
+INSTALL(TARGETS plots DESTINATION ${CMAKE_INSTALL_BINDIR})
Index: qcustomplot/examples/scrollbar-axis-range-control/CMakeLists.txt
===================================================================
--- /dev/null
+++ qcustomplot/examples/scrollbar-axis-range-control/CMakeLists.txt
@@ -0,0 +1,20 @@
+project(scrollbar CXX)
+cmake_minimum_required(VERSION 2.8)
+
+FIND_PACKAGE(QCustomPlot REQUIRED)
+FIND_PACKAGE(Qt5PrintSupport REQUIRED)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
+
+INCLUDE(GNUInstallDirs)
+FIND_PACKAGE(Qt5Widgets REQUIRED)
+INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QCustomPlot_INCLUDE_DIR})
+ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS} -DQCUSTOMPLOT_USE_LIBRARY)
+SET(CMAKE_AUTOMOC ON)
+
+QT5_WRAP_UI(UI_HEADERS mainwindow.ui)
+ADD_EXECUTABLE(scrollbar main.cpp mainwindow.cpp ${UI_HEADERS})
+QT5_USE_MODULES(scrollbar Widgets)
+
+TARGET_LINK_LIBRARIES(scrollbar ${Qt5Widgets_LIBRARIES} ${QCustomPlot_LIBRARIES} Qt5::PrintSupport)
+INSTALL(TARGETS scrollbar DESTINATION ${CMAKE_INSTALL_BINDIR})
Index: qcustomplot/examples/text-document-integration/CMakeLists.txt
===================================================================
--- /dev/null
+++ qcustomplot/examples/text-document-integration/CMakeLists.txt
@@ -0,0 +1,20 @@
+project(text CXX)
+cmake_minimum_required(VERSION 2.8)
+
+FIND_PACKAGE(QCustomPlot REQUIRED)
+FIND_PACKAGE(Qt5PrintSupport REQUIRED)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
+
+INCLUDE(GNUInstallDirs)
+FIND_PACKAGE(Qt5Widgets REQUIRED)
+INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QCustomPlot_INCLUDE_DIR})
+ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS} -DQCUSTOMPLOT_USE_LIBRARY)
+SET(CMAKE_AUTOMOC ON)
+
+QT5_WRAP_UI(UI_HEADERS mainwindow.ui)
+ADD_EXECUTABLE(text main.cpp mainwindow.cpp qcpdocumentobject.cpp ${UI_HEADERS})
+QT5_USE_MODULES(text Widgets)
+
+TARGET_LINK_LIBRARIES(text ${Qt5Widgets_LIBRARIES} ${QCustomPlot_LIBRARIES} Qt5::PrintSupport)
+INSTALL(TARGETS text DESTINATION ${CMAKE_INSTALL_BINDIR})
Index: qcustomplot/cmake/QCustomPlotConfig.cmake
===================================================================
--- /dev/null
+++ qcustomplot/cmake/QCustomPlotConfig.cmake
@@ -0,0 +1,19 @@
+# Try to find the QCustomPlot librairies
+#  QCustomPlot_FOUND - system has QCustomPlot lib
+#  QCustomPlot_INCLUDE_DIR - the GMP include directory
+#  QCustomPlot_LIBRARIES - Libraries needed to use QCustomPlot
+
+# Copyright (c) 2013, Anton Gladky <gladk@debian.org>
+#
+# Redistribution and use is allowed according to the terms of the GPL-3 license.
+
+
+IF (QCustomPlot_INCLUDE_DIR AND QCustomPlot_LIBRARIES)
+  SET(QCustomPlot_FIND_QUIETLY TRUE)
+ENDIF (QCustomPlot_INCLUDE_DIR AND QCustomPlot_LIBRARIES)
+
+FIND_PATH(QCustomPlot_INCLUDE_DIR NAMES qcustomplot.h )
+FIND_LIBRARY(QCustomPlot_LIBRARIES NAMES qcustomplot )
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(QCustomPlot DEFAULT_MSG QCustomPlot_INCLUDE_DIR QCustomPlot_LIBRARIES)