Skip to content

Commit

Permalink
allow build against custom version of qscintilla. see issue 1493
Browse files Browse the repository at this point in the history
  • Loading branch information
donbright committed Nov 21, 2015
1 parent 3caaa1b commit d5f99aa
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 13 deletions.
47 changes: 35 additions & 12 deletions scintilla.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}
6 changes: 5 additions & 1 deletion scripts/uni-build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d5f99aa

Please sign in to comment.