diff --git a/scintilla.pri b/scintilla.pri index 849f85a127a..b0c742bcef2 100644 --- a/scintilla.pri +++ b/scintilla.pri @@ -4,23 +4,46 @@ scintilla { DEFINES += USE_SCINTILLA_EDITOR + QSCILOADED = + OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES) + + !isEmpty(OPENSCAD_LIBDIR) { + exists($$OPENSCAD_LIBDIR) { + exists($$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu/qt5/mkspecs/features/qscintilla2.prf) { + include($$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu/qt5/mkspecs/features/qscintilla2.prf) + INCLUDEPATH = $$OPENSCAD_LIBDIR/include/qt5 $$INCLUDEPATH + LIBS = -L$$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu $$LIBS + QSCILOADED=yes + } + } + } + # The qscintilla2.prf which ships with QScintilla is broken for Mac/Windows # debug builds, so we supply our own - win32|macx: { - include(qscintilla2.prf) + isEmpty(QSCILOADED) { + win32|macx: { + include(qscintilla2.prf) + QSCILOADED=yes + } } - else: { + + isEmpty(QSCILOADED) { load(qscintilla2) { + QSCILOADED=yes # All good, found installed *.prf file. - } else { - # Older scintilla libs (e.g. 2.7.2 on fedora20) do not provide the - # prf file. - # - # In addition Ubuntu (and maybe other distributions) have the Qt5 - # prf file in the wrong location so it's not picked up by qmake - # - message("Using local copy of qscintilla2.prf instead.") - include(qscintilla2.prf) } } + + isEmpty(QSCILOADED) { + # Older scintilla libs (e.g. 2.7.2 on fedora20) do not provide the + # prf file. + # + # In addition Ubuntu (and maybe other distributions) have the Qt5 + # prf file in the wrong location so it's not picked up by qmake + # + message("Using local copy of qscintilla2.prf instead.") + include(qscintilla2.prf) + QSCILOADED=yes + } + } diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index f86b76a4225..0aac7ccc577 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -190,7 +190,11 @@ build_qt5scintilla2() tar xzf QScintilla-gpl-$version.tar.gz cd QScintilla-gpl-$version/Qt4Qt5/ qmake CONFIG+=staticlib - make -j"$NUMCPU" install + tmpinstalldir=$DEPLOYDIR/tmp/qsci$version + INSTALL_ROOT=$tmpinstalldir make -j"$NUMCPU" install + cp -av $tmpinstalldir/usr/share $DEPLOYDIR/ + cp -av $tmpinstalldir/usr/include $DEPLOYDIR/ + cp -av $tmpinstalldir/usr/lib $DEPLOYDIR/ } build_bison()