Commit 57fef3b1 authored by Ralf Habacker's avatar Ralf Habacker

Add support to use external KDevPHP packaga

If no external development package has been found fallback to embedded
version.

This commit adds an additional optional dependency for the KDevPHP package, which
named e.g. on openSUSE 'kdevelop5-plugin-php-devel'.

BUG:428460
FIXED-IN:2.32.80 (KDE releases 20.11.80)
parent 1d569382
...@@ -129,18 +129,26 @@ if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND) ...@@ -129,18 +129,26 @@ if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND)
include_directories( include_directories(
${KDEVPGQT_INCLUDE_DIR} ${KDEVPGQT_INCLUDE_DIR}
${KDEVPLATFORM_INCLUDE_DIR} ${KDEVPLATFORM_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/${KDEV_SOURCE_DIR}/parser
${CMAKE_BINARY_DIR}/${KDEV_SOURCE_DIR}/parser
) )
set(NO_INSTALL 1)
set(BUILD_PARSER_ONLY 1)
set(BUILD_PHP_IMPORT 1) set(BUILD_PHP_IMPORT 1)
add_definitions( add_definitions(
-DKDEVPHPPARSER_EXPORT=
-DENABLE_PHP_IMPORT -DENABLE_PHP_IMPORT
) )
add_subdirectory(lib/kdevplatform) add_subdirectory(lib/kdevplatform)
add_subdirectory(${KDEV_SOURCE_DIR}) find_package(KDevPHP)
if(NOT KDevPHP_FOUND)
set(NO_INSTALL 1)
set(BUILD_PARSER_ONLY 1)
set(BUILD_PHP_IMPORT 1)
add_definitions(
-DKDEVPHPPARSER_EXPORT=
)
include_directories(
${CMAKE_SOURCE_DIR}/${KDEV_SOURCE_DIR}
${CMAKE_BINARY_DIR}/${KDEV_SOURCE_DIR}
)
add_subdirectory(${KDEV_SOURCE_DIR})
endif()
else() else()
set(BUILD_PHP_IMPORT 0) set(BUILD_PHP_IMPORT 0)
endif() endif()
......
...@@ -39,18 +39,21 @@ QTextStream qout(stdout); ...@@ -39,18 +39,21 @@ QTextStream qout(stdout);
QTextStream qerr(stderr); QTextStream qerr(stderr);
QTextStream qin(stdin); QTextStream qin(stdin);
#include "parsesession.h" // kdevphp
#include "phplexer.h" #include <parser/parsesession.h>
#include "phpparser.h" #include <parser/phplexer.h>
#include "phpdebugvisitor.h" #include <parser/phpparser.h>
#include "phpast.h" #include <parser/phpdebugvisitor.h>
#include "tokenstream.h" #include <parser/phpast.h>
#include "phptokentext.h" #include <parser/tokenstream.h>
#include <parser/phptokentext.h>
// kdevplatform
#include <tests/autotestshell.h> #include <tests/autotestshell.h>
#include <language/duchain/duchain.h> #include <language/duchain/duchain.h>
#include <language/duchain/problem.h> #include <language/duchain/problem.h>
#include <language/codegen/coderepresentation.h> #include <language/codegen/coderepresentation.h>
#include <language/editor/documentrange.h>
#include <tests/testcore.h> #include <tests/testcore.h>
namespace Php { namespace Php {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment