-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathros-noetic-plotjuggler.patch
606 lines (542 loc) · 22.4 KB
/
ros-noetic-plotjuggler.patch
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
diff --git a/cmake/FindXCB.cmake b/cmake/FindXCB.cmake
new file mode 100644
index 00000000..a2e2757a
--- /dev/null
+++ b/cmake/FindXCB.cmake
@@ -0,0 +1,51 @@
+# - FindXCB
+#
+# Copyright 2015 Valve Coporation
+
+find_package(PkgConfig)
+
+if(NOT XCB_FIND_COMPONENTS)
+ set(XCB_FIND_COMPONENTS xcb)
+endif()
+
+include(FindPackageHandleStandardArgs)
+set(XCB_FOUND true)
+set(XCB_INCLUDE_DIRS "")
+set(XCB_LIBRARIES "")
+foreach(comp ${XCB_FIND_COMPONENTS})
+ # component name
+ string(TOUPPER ${comp} compname)
+ string(REPLACE "-" "_" compname ${compname})
+ # header name
+ string(REPLACE "xcb-" "" headername xcb/${comp}.h)
+ # library name
+ set(libname ${comp})
+
+ pkg_check_modules(PC_${comp} QUIET ${comp})
+
+ find_path(${compname}_INCLUDE_DIR NAMES ${headername}
+ HINTS
+ ${PC_${comp}_INCLUDEDIR}
+ ${PC_${comp}_INCLUDE_DIRS}
+ )
+
+ find_library(${compname}_LIBRARY NAMES ${libname}
+ HINTS
+ ${PC_${comp}_LIBDIR}
+ ${PC_${comp}_LIBRARY_DIRS}
+ )
+
+ find_package_handle_standard_args(${comp}
+ FOUND_VAR ${comp}_FOUND
+ REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY)
+ mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY)
+
+ list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR})
+ list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY})
+
+ if(NOT ${comp}_FOUND)
+ set(XCB_FOUND false)
+ endif()
+endforeach()
+
+list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
diff --git a/3rdparty/nlohmann/json.hpp b/3rdparty/nlohmann/json.hpp
index cb27e058..cecdb1fd 100644
--- a/3rdparty/nlohmann/json.hpp
+++ b/3rdparty/nlohmann/json.hpp
@@ -3198,6 +3198,7 @@ template <class T> struct identity_tag {};
#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type
#include <utility> // declval
#include <tuple> // tuple
+#include <string> // char_traits
// #include <nlohmann/detail/macro_scope.hpp>
@@ -3261,6 +3262,7 @@ struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>
// #include <nlohmann/detail/macro_scope.hpp>
+// #include <nlohmann/detail/meta/type_traits.hpp>
namespace nlohmann
@@ -3272,6 +3274,7 @@ NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin);
// #include <nlohmann/detail/macro_scope.hpp>
+// #include <nlohmann/detail/meta/type_traits.hpp>
namespace nlohmann
@@ -3482,6 +3485,63 @@ struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json<T>::value >>
};
+/////////////////
+// char_traits //
+/////////////////
+
+// Primary template of char_traits calls std char_traits
+template<typename T>
+struct char_traits : std::char_traits<T>
+{};
+
+// Explicitly define char traits for unsigned char since it is not standard
+template<>
+struct char_traits<unsigned char> : std::char_traits<char>
+{
+ using char_type = unsigned char;
+ using int_type = uint64_t;
+
+ // Redefine to_int_type function
+ static int_type to_int_type(char_type c) noexcept
+ {
+ return static_cast<int_type>(c);
+ }
+
+ static char_type to_char_type(int_type i) noexcept
+ {
+ return static_cast<char_type>(i);
+ }
+
+ static constexpr int_type eof() noexcept
+ {
+ return static_cast<int_type>(EOF);
+ }
+};
+
+// Explicitly define char traits for signed char since it is not standard
+template<>
+struct char_traits<signed char> : std::char_traits<char>
+{
+ using char_type = signed char;
+ using int_type = uint64_t;
+
+ // Redefine to_int_type function
+ static int_type to_int_type(char_type c) noexcept
+ {
+ return static_cast<int_type>(c);
+ }
+
+ static char_type to_char_type(int_type i) noexcept
+ {
+ return static_cast<char_type>(i);
+ }
+
+ static constexpr int_type eof() noexcept
+ {
+ return static_cast<int_type>(EOF);
+ }
+};
+
///////////////////
// is_ functions //
///////////////////
@@ -5342,16 +5402,16 @@ class iterator_input_adapter
: current(std::move(first)), end(std::move(last))
{}
- typename std::char_traits<char_type>::int_type get_character()
+ typename char_traits<char_type>::int_type get_character()
{
if (JSON_HEDLEY_LIKELY(current != end))
{
- auto result = std::char_traits<char_type>::to_int_type(*current);
+ auto result = char_traits<char_type>::to_int_type(*current);
std::advance(current, 1);
return result;
}
- return std::char_traits<char_type>::eof();
+ return char_traits<char_type>::eof();
}
private:
@@ -6517,7 +6577,7 @@ class lexer : public lexer_base<BasicJsonType>
using number_float_t = typename BasicJsonType::number_float_t;
using string_t = typename BasicJsonType::string_t;
using char_type = typename InputAdapterType::char_type;
- using char_int_type = typename std::char_traits<char_type>::int_type;
+ using char_int_type = typename char_traits<char_type>::int_type;
public:
using token_type = typename lexer_base<BasicJsonType>::token_type;
@@ -6667,7 +6727,7 @@ class lexer : public lexer_base<BasicJsonType>
switch (get())
{
// end of file while parsing string
- case std::char_traits<char_type>::eof():
+ case char_traits<char_type>::eof():
{
error_message = "invalid string: missing closing quote";
return token_type::parse_error;
@@ -7256,7 +7316,7 @@ class lexer : public lexer_base<BasicJsonType>
{
case '\n':
case '\r':
- case std::char_traits<char_type>::eof():
+ case char_traits<char_type>::eof():
case '\0':
return true;
@@ -7273,7 +7333,7 @@ class lexer : public lexer_base<BasicJsonType>
{
switch (get())
{
- case std::char_traits<char_type>::eof():
+ case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
@@ -7702,10 +7762,10 @@ scan_number_done:
token_type scan_literal(const char_type* literal_text, const std::size_t length,
token_type return_type)
{
- JSON_ASSERT(std::char_traits<char_type>::to_char_type(current) == literal_text[0]);
+ JSON_ASSERT(char_traits<char_type>::to_char_type(current) == literal_text[0]);
for (std::size_t i = 1; i < length; ++i)
{
- if (JSON_HEDLEY_UNLIKELY(std::char_traits<char_type>::to_char_type(get()) != literal_text[i]))
+ if (JSON_HEDLEY_UNLIKELY(char_traits<char_type>::to_char_type(get()) != literal_text[i]))
{
error_message = "invalid literal";
return token_type::parse_error;
@@ -7723,7 +7783,7 @@ scan_number_done:
{
token_buffer.clear();
token_string.clear();
- token_string.push_back(std::char_traits<char_type>::to_char_type(current));
+ token_string.push_back(char_traits<char_type>::to_char_type(current));
}
/*
@@ -7731,7 +7791,7 @@ scan_number_done:
This function provides the interface to the used input adapter. It does
not throw in case the input reached EOF, but returns a
- `std::char_traits<char>::eof()` in that case. Stores the scanned characters
+ `char_traits<char>::eof()` in that case. Stores the scanned characters
for use in error messages.
@return character read from the input
@@ -7751,9 +7811,9 @@ scan_number_done:
current = ia.get_character();
}
- if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof()))
+ if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
- token_string.push_back(std::char_traits<char_type>::to_char_type(current));
+ token_string.push_back(char_traits<char_type>::to_char_type(current));
}
if (current == '\n')
@@ -7792,7 +7852,7 @@ scan_number_done:
--position.chars_read_current_line;
}
- if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof()))
+ if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
@@ -7986,7 +8046,7 @@ scan_number_done:
// end of input (the null byte is needed when parsing from
// string literals)
case '\0':
- case std::char_traits<char_type>::eof():
+ case char_traits<char_type>::eof():
return token_type::end_of_input;
// error
@@ -8004,7 +8064,7 @@ scan_number_done:
const bool ignore_comments = false;
/// the current character
- char_int_type current = std::char_traits<char_type>::eof();
+ char_int_type current = char_traits<char_type>::eof();
/// whether the next get() call should just return current
bool next_unget = false;
@@ -8235,7 +8295,7 @@ class binary_reader
using binary_t = typename BasicJsonType::binary_t;
using json_sax_t = SAX;
using char_type = typename InputAdapterType::char_type;
- using char_int_type = typename std::char_traits<char_type>::int_type;
+ using char_int_type = typename char_traits<char_type>::int_type;
public:
/*!
@@ -8307,7 +8367,7 @@ class binary_reader
get();
}
- if (JSON_HEDLEY_UNLIKELY(current != std::char_traits<char_type>::eof()))
+ if (JSON_HEDLEY_UNLIKELY(current != char_traits<char_type>::eof()))
{
return sax->parse_error(chars_read, get_token_string(),
parse_error::create(110, chars_read, exception_message(format, "expected end of input; last byte: 0x" + get_token_string(), "value"), BasicJsonType()));
@@ -8389,7 +8449,7 @@ class binary_reader
return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "string length must be at least 1, is " + std::to_string(len), "string"), BasicJsonType()));
}
- return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof();
+ return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != char_traits<char_type>::eof();
}
/*!
@@ -8580,7 +8640,7 @@ class binary_reader
switch (get_char ? get() : current)
{
// EOF
- case std::char_traits<char_type>::eof():
+ case char_traits<char_type>::eof():
return unexpect_eof(input_format_t::cbor, "value");
// Integer 0x00..0x17 (0..23)
@@ -9350,7 +9410,7 @@ class binary_reader
switch (get())
{
// EOF
- case std::char_traits<char_type>::eof():
+ case char_traits<char_type>::eof():
return unexpect_eof(input_format_t::msgpack, "value");
// positive fixint
@@ -10172,7 +10232,7 @@ class binary_reader
{
switch (prefix)
{
- case std::char_traits<char_type>::eof(): // EOF
+ case char_traits<char_type>::eof(): // EOF
return unexpect_eof(input_format_t::ubjson, "value");
case 'T': // true
@@ -10478,7 +10538,7 @@ class binary_reader
This function provides the interface to the used input adapter. It does
not throw in case the input reached EOF, but returns a -'ve valued
- `std::char_traits<char_type>::eof()` in that case.
+ `char_traits<char_type>::eof()` in that case.
@return character read from the input
*/
@@ -10618,7 +10678,7 @@ class binary_reader
JSON_HEDLEY_NON_NULL(3)
bool unexpect_eof(const input_format_t format, const char* context) const
{
- if (JSON_HEDLEY_UNLIKELY(current == std::char_traits<char_type>::eof()))
+ if (JSON_HEDLEY_UNLIKELY(current == char_traits<char_type>::eof()))
{
return sax->parse_error(chars_read, "<end of file>",
parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), BasicJsonType()));
@@ -10679,7 +10739,7 @@ class binary_reader
InputAdapterType ia;
/// the current character
- char_int_type current = std::char_traits<char_type>::eof();
+ char_int_type current = char_traits<char_type>::eof();
/// the number of characters read
std::size_t chars_read = 0;
@@ -16102,8 +16162,8 @@ class serializer
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
- , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
- , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
+ , thousands_sep(loc->thousands_sep == nullptr ? '\0' : char_traits<char>::to_char_type(* (loc->thousands_sep)))
+ , decimal_point(loc->decimal_point == nullptr ? '\0' : char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
diff --git a/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp b/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp
index 761e0b73..b7ce4129 100644
--- a/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp
+++ b/plotjuggler_plugins/ParserProtobuf/error_collectors.cpp
@@ -2,38 +2,38 @@
#include <QMessageBox>
#include <QDebug>
-void FileErrorCollector::AddError(const std::string& filename, int line, int,
- const std::string& message)
+void FileErrorCollector::RecordError(const absl::string_view filename, int line, int,
+ const absl::string_view message)
{
auto msg = QString("File: [%1] Line: [%2] Message: %3\n\n")
- .arg(QString::fromStdString(filename))
+ .arg(QString::fromStdString(std::string(filename)))
.arg(line)
- .arg(QString::fromStdString(message));
+ .arg(QString::fromStdString(std::string(message)));
_errors.push_back(msg);
}
-void FileErrorCollector::AddWarning(const std::string& filename, int line, int,
- const std::string& message)
+void FileErrorCollector::RecordWarning(const absl::string_view filename, int line, int,
+ const absl::string_view message)
{
auto msg = QString("Warning [%1] line %2: %3")
- .arg(QString::fromStdString(filename))
+ .arg(QString::fromStdString(std::string(filename)))
.arg(line)
- .arg(QString::fromStdString(message));
+ .arg(QString::fromStdString(std::string(message)));
qDebug() << msg;
}
-void IoErrorCollector::AddError(int line, google::protobuf::io::ColumnNumber,
- const std::string& message)
+void IoErrorCollector::RecordError(int line, google::protobuf::io::ColumnNumber,
+ const absl::string_view message)
{
_errors.push_back(
- QString("Line: [%1] Message: %2\n").arg(line).arg(QString::fromStdString(message)));
+ QString("Line: [%1] Message: %2\n").arg(line).arg(QString::fromStdString(std::string(message))));
}
-void IoErrorCollector::AddWarning(int line, google::protobuf::io::ColumnNumber column,
- const std::string& message)
+void IoErrorCollector::RecordWarning(int line, google::protobuf::io::ColumnNumber column,
+ const absl::string_view message)
{
qDebug() << QString("Line: [%1] Message: %2\n")
.arg(line)
- .arg(QString::fromStdString(message));
+ .arg(QString::fromStdString(std::string(message)));
}
diff --git a/plotjuggler_plugins/ParserProtobuf/error_collectors.h b/plotjuggler_plugins/ParserProtobuf/error_collectors.h
index f70a881f..7afe1fea 100644
--- a/plotjuggler_plugins/ParserProtobuf/error_collectors.h
+++ b/plotjuggler_plugins/ParserProtobuf/error_collectors.h
@@ -3,17 +3,18 @@
#include <google/protobuf/io/tokenizer.h>
#include <google/protobuf/compiler/importer.h>
+#include <absl/strings/string_view.h>
#include <QStringList>
class IoErrorCollector : public google::protobuf::io::ErrorCollector
{
public:
- void AddError(int line, google::protobuf::io::ColumnNumber column,
- const std::string& message) override;
+ void RecordError(int line, google::protobuf::io::ColumnNumber column,
+ const absl::string_view message) override;
- void AddWarning(int line, google::protobuf::io::ColumnNumber column,
- const std::string& message) override;
+ void RecordWarning(int line, google::protobuf::io::ColumnNumber column,
+ const absl::string_view message) override;
const QStringList& errors()
{
@@ -27,11 +28,11 @@ private:
class FileErrorCollector : public google::protobuf::compiler::MultiFileErrorCollector
{
public:
- void AddError(const std::string& filename, int line, int,
- const std::string& message) override;
+ void RecordError(const absl::string_view filename, int line, int,
+ const absl::string_view message) override;
- void AddWarning(const std::string& filename, int line, int,
- const std::string& message) override;
+ void RecordWarning(const absl::string_view filename, int line, int,
+ const absl::string_view message) override;
const QStringList& errors()
{
diff --git a/3rdparty/Qt-Advanced-Docking/CMakeLists.txt b/3rdparty/Qt-Advanced-Docking/CMakeLists.txt
index 6b650f1b..82c58edb 100644
--- a/3rdparty/Qt-Advanced-Docking/CMakeLists.txt
+++ b/3rdparty/Qt-Advanced-Docking/CMakeLists.txt
@@ -67,7 +67,9 @@ target_link_libraries(qt_advanced_docking PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets
if(UNIX AND NOT APPLE)
target_link_libraries(qt_advanced_docking PUBLIC Qt5::X11Extras)
- target_link_libraries(qt_advanced_docking PRIVATE xcb)
+ find_package(XCB REQUIRED)
+ target_link_libraries(qt_advanced_docking PRIVATE ${XCB_LIBRARIES})
+ target_include_directories(qt_advanced_docking SYSTEM PUBLIC ${XCB_INCLUDE_DIRS})
endif()
set_target_properties(qt_advanced_docking PROPERTIES
diff --git a/3rdparty/lua-5.4.3/CMakeLists.txt b/3rdparty/lua-5.4.3/CMakeLists.txt
index ad3dc012..a3da197b 100644
--- a/3rdparty/lua-5.4.3/CMakeLists.txt
+++ b/3rdparty/lua-5.4.3/CMakeLists.txt
@@ -1,3 +1,5 @@
+include_directories( ./src )
+
set(LUA_LIB_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/src/lapi.c
${CMAKE_CURRENT_SOURCE_DIR}/src/lcode.c
@@ -32,7 +34,7 @@ set(LUA_LIB_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/src/loadlib.c
${CMAKE_CURRENT_SOURCE_DIR}/src/linit.c
)
-set(LUA_LIB_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src)
+# set(LUA_LIB_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src)
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
add_compile_options(-fPIC)
@@ -42,7 +44,7 @@ add_library(lua_static STATIC
${LUA_LIB_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/src/lua.c
)
-target_include_directories(lua_static PUBLIC ${LUA_LIB_INCLUDE})
+# target_include_directories(lua_static PUBLIC ${LUA_LIB_INCLUDE})
add_library(lua_objects OBJECT ${LUA_LIB_SRCS})
@@ -55,3 +57,11 @@ if(EMSCRIPTEN)
endif()
target_compile_definitions(lua_static PUBLIC ${LUA_DEFINITIONS})
+install(
+ TARGETS
+ lua_static
+ EXPORT export_lua_static
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ INCLUDES DESTINATION include )
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16477dd3..859f7320 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.10.2)
+cmake_minimum_required(VERSION 3.20)
PROJECT(plotjuggler LANGUAGES C CXX VERSION 3.9.1)
@@ -94,18 +94,6 @@ if (NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
endif()
-if(APPLE AND EXISTS /usr/local/opt/qt5)
- # Homebrew installs Qt5 (up to at least 5.9.1) in
- # /usr/local/qt5, ensure it can be found by CMake since
- # it is not in the default /usr/local prefix.
- # source: https://github.com/Homebrew/homebrew-core/issues/8392#issuecomment-325226494
- list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
- set(CMAKE_MACOSX_RPATH 1)
-elseif(APPLE AND EXISTS /opt/homebrew/opt/qt@5)
- list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/qt@5")
- set(CMAKE_MACOSX_RPATH 1)
-endif()
-
find_package(Qt5 REQUIRED COMPONENTS
Core
Widgets
@@ -120,11 +108,9 @@ find_package(Qt5 REQUIRED COMPONENTS
set( QT_LINK_LIBRARIES
Qt5::Core
Qt5::Widgets
- Qt5::PrintSupport
Qt5::Xml
Qt5::Concurrent
Qt5::Svg
- Qt5::OpenGL
Qt5::WebSockets
)
@@ -191,7 +177,7 @@ if (BASE_AS_SHARED)
${PLOTJUGGLER_BASE_SRC}
${PLOTJUGGLER_BASE_MOCS}
)
- target_link_libraries(plotjuggler_base PRIVATE lua_objects plotjuggler_qwt_objects)
+ target_link_libraries(plotjuggler_base PRIVATE ${QT_LINK_LIBRARIES} lua_objects plotjuggler_qwt_objects)
else()
add_library(plotjuggler_base STATIC
${PLOTJUGGLER_BASE_SRC}
@@ -199,13 +185,6 @@ else()
)
endif()
-# target_link_libraries(plotjuggler_base plotjuggler_qwt)
-
-target_include_directories(plotjuggler_base INTERFACE
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
- $<INSTALL_INTERFACE:include>
-)
-
######################### INSTALL ####################################
if(COMPILING_WITH_CATKIN)
diff --git a/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt b/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt
index f399fdad..4c89c787 100644
--- a/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt
+++ b/plotjuggler_plugins/ParserProtobuf/CMakeLists.txt
@@ -1,13 +1,6 @@
-if(BUILDING_WITH_CONAN)
- message(STATUS "Finding Protobuf with conan")
- set(Protobuf_LIBS protobuf::libprotobuf)
-else()
- message(STATUS "Finding Protobuf without package managers")
- find_package(Protobuf QUIET)
- set(Protobuf_LIBS ${Protobuf_LIBRARIES})
-endif()
+set(Protobuf_LIBS protobuf::libprotobuf)
-find_package(Protobuf QUIET)
+find_package(Protobuf QUIET CONFIG)
if( Protobuf_FOUND)