Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks for Mac compilation. #409

Merged
merged 4 commits into from
Jan 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tools/ld-analyse/dropoutanalysisdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
#define DROPOUTANALYSISDIALOG_H

#include <QDialog>
#include <qwt/qwt_plot.h>
#include <qwt/qwt_plot_canvas.h>
#include <qwt/qwt_legend.h>
#include <qwt/qwt_plot_grid.h>
#include <qwt/qwt_plot_curve.h>
#include <qwt_plot.h>
#include <qwt_plot_canvas.h>
#include <qwt_legend.h>
#include <qwt_plot_grid.h>
#include <qwt_plot_curve.h>


#include "lddecodemetadata.h"

Expand Down
18 changes: 12 additions & 6 deletions tools/ld-analyse/ld-analyse.pro
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,24 @@ RESOURCES += \
ld-analyse-resources.qrc

# Additional include paths to support MacOS compilation
macx {
INCLUDEPATH += "/usr/local/opt/opencv@2/include"
LIBS += -L"/usr/local/opt/opencv@2/lib"
INCLUDEPATH += "/usr/local/include"
}

# Normal open-source OS goodness
INCLUDEPATH += "/usr/local/include/opencv"
LIBS += -L"/usr/local/lib"
LIBS += -lopencv_core -lopencv_imgcodecs -lopencv_highgui -lopencv_imgproc -lopencv_video -lfftw3

# Include the QWT library (used for charting)
INCLUDEPATH += $(QWT)/include
LIBS += -lqwt-qt5




unix:!macx {
#INCLUDEPATH += $(QWT)/include
INCLUDEPATH += /usr/include/qwt
LIBS += -lqwt-qt5 #Distrubutions other than Ubuntu may be -lqwt
}
macx {
INCLUDEPATH += "/usr/local/lib/qwt.framework/Versions/6/Headers"
LIBS += -F"/usr/local/lib" -framework qwt
}
4 changes: 4 additions & 0 deletions tools/ld-analyse/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ void MainWindow::showFrame()
if (!tbcSource.getIsSourcePal()) {
closedCaptionDialog->addData(currentFrameNumber, tbcSource.getCcData0(currentFrameNumber), tbcSource.getCcData1(currentFrameNumber));
}
// QT Bug workaround for some macOS versions
#if defined(Q_OS_MACOS)
repaint();
#endif
}

// Redraw the frame viewer (for example, when scaleFactor has been changed)
Expand Down
4 changes: 2 additions & 2 deletions tools/ld-analyse/snranalysisdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ void SnrAnalysisDialog::removeChartContents()
// Add a data point to the chart
void SnrAnalysisDialog::addDataPoint(qint32 fieldNumber, qreal blackSnr, qreal whiteSnr)
{
if (!isnanf(static_cast<float>(blackSnr))) blackPoints->append(QPointF(fieldNumber, blackSnr));
if (!isnanf(static_cast<float>(whiteSnr))) whitePoints->append(QPointF(fieldNumber, whiteSnr));
if (!std::isnan(static_cast<float>(blackSnr))) blackPoints->append(QPointF(fieldNumber, blackSnr));
if (!std::isnan(static_cast<float>(whiteSnr))) whitePoints->append(QPointF(fieldNumber, whiteSnr));

// Keep track of the minimum and maximum SNR values
if (blackSnr < minSnr) minSnr = blackSnr;
Expand Down
12 changes: 7 additions & 5 deletions tools/ld-analyse/snranalysisdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
#ifndef SNRANALYSISDIALOG_H
#define SNRANALYSISDIALOG_H

#include <cmath>

#include <QDialog>
#include <qwt/qwt_plot.h>
#include <qwt/qwt_plot_canvas.h>
#include <qwt/qwt_legend.h>
#include <qwt/qwt_plot_grid.h>
#include <qwt/qwt_plot_curve.h>
#include <qwt_plot.h>
#include <qwt_plot_canvas.h>
#include <qwt_legend.h>
#include <qwt_plot_grid.h>
#include <qwt_plot_curve.h>

#include "lddecodemetadata.h"

Expand Down
3 changes: 3 additions & 0 deletions tools/ld-chroma-decoder/ld-chroma-decoder.pro
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ unix:!android: target.path = $$PREFIX/bin/
!isEmpty(target.path): INSTALLS += target

# Additional include paths to support MacOS compilation
macx {
INCLUDEPATH += "/usr/local/opt/opencv@2/include"
LIBS += -L"/usr/local/opt/opencv@2/lib"
INCLUDEPATH += "/usr/local/include"
}

# Normal open-source OS goodness
INCLUDEPATH += "/usr/local/include/opencv"
Expand Down