Skip to content

Commit

Permalink
config: qscintilla check
Browse files Browse the repository at this point in the history
Fixes: 2782325

Try and find qscintilla automatically and stop if its not found. Saving
a bit of hassle when building from source.

There might be a better way of doing this with some qmake magic but I
haven't found it yet.
  • Loading branch information
cpackham committed Nov 19, 2009
1 parent d970295 commit f50ed9f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion trunk/app/app.pro
Expand Up @@ -51,7 +51,7 @@ FORMS += querydialog.ui \
configenginesdialog.ui \
openprojectdialog.ui
INCLUDEPATH += .. \
$${QSCI_ROOT_PATH}/include/Qsci \
$${QSCI_HEADER_PATH}/Qsci \
.
LIBS += -L../core \
-lkscope_core \
Expand Down
35 changes: 34 additions & 1 deletion trunk/config
Expand Up @@ -10,7 +10,38 @@ INSTALL_PATH = /usr/local
# The root path of the QScintilla installation.
# KScope expects to find QScintilla's include files under
# QSCI_ROOT_PATH/include/Qsci and the library under QSCI_ROOT_PATH/lib.
QSCI_ROOT_PATH = /usr
QSCI_LIB_CANDIDATES = /usr/lib /usr/local/lib /usr/lib/qt4
QSCI_LIB = libqscintilla2.so
win32 {
qscintilla2.dll
}

for(candidate, QSCI_LIB_CANDIDATES) {
exists( $${candidate}/$${QSCI_LIB} ) {
QSCI_LIB_PATH = $${candidate}
}
}

isEmpty( QSCI_LIB_PATH ) {
error( "QScintilla2 library not found in $${QSCI_LIB_CANDIDATES}" )
} else {
message( "Found QScintilla2 in $${QSCI_LIB_PATH}/" )
}

QSCI_HEADER_CANDIDATES = /usr/include /usr/local/include /usr/include/qt4
QSCI_HEADER = qsciscintilla.h

for(candidate, QSCI_HEADER_CANDIDATES) {
exists( $${candidate}/Qsci/$${QSCI_HEADER} ) {
QSCI_HEADER_PATH = $${candidate}
}
}

isEmpty( QSCI_HEADER_PATH ) {
error( "QScintilla2 headers not found in $${QSCI_HEADER_CANDIDATES}" )
} else {
message( "Found QScintilla2 headers in $${QSCI_HEADER_PATH}/" )
}

# --------------------------- END: EDIT ME ------------------------------------

Expand All @@ -19,3 +50,5 @@ CONFIG += debug_and_release \
warn_all
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
QT += xml


4 changes: 2 additions & 2 deletions trunk/editor/editor.pro
Expand Up @@ -24,11 +24,11 @@ SOURCES += viscintilla.cpp \
configdialog.cpp \
findtextdialog.cpp
INCLUDEPATH += .. \
$${QSCI_ROOT_PATH}/include/Qsci \
$${QSCI_HEADER_PATH}/Qsci \
.
LIBS += -L../core \
-lkscope_core \
-L$${QSCI_ROOT_PATH}/lib \
-L$${QSCI_LIB_PATH} \
-lqscintilla2
target.path = $${INSTALL_PATH}/lib
INSTALLS += target

0 comments on commit f50ed9f

Please sign in to comment.