Commit 8341bf81 authored by Ralf Habacker's avatar Ralf Habacker

Add PHP import support for KF5 builds

PHP import support depends on kdevplatform component KDev::Tests.

BUG:388428
FIXED-IN:2.24.80 (KDE Applications 18.03.80)
parent e54c21b7
......@@ -33,6 +33,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks")
endif()
find_package(KDevelop-PG-Qt)
if(NOT BUILD_KF5)
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
......@@ -128,7 +130,6 @@ if(NOT BUILD_KF5)
)
endforeach()
endmacro(ecm_mark_nongui_executable)
find_package(KDevelop-PG-Qt)
find_package(KDevPlatform)
if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND)
include_directories(
......@@ -207,6 +208,30 @@ else()
ki18n_install(po)
kdoctools_install(po)
find_package(KDevPlatform "5.1.2" COMPONENTS
KDev::Interfaces
KDev::Language
KDev::Tests
)
if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND AND TARGET KDev::Tests)
include_directories(
${KDEVPGQT_INCLUDE_DIR}
${KDEVPLATFORM_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/lib/kdev5-php/parser
${CMAKE_BINARY_DIR}/lib/kdev5-php/parser
)
set(NO_INSTALL 1)
set(BUILD_PARSER_ONLY 1)
set(BUILD_PHP_IMPORT 1)
add_definitions(
-DKDEVPHPPARSER_EXPORT=
-DENABLE_PHP_IMPORT
)
add_subdirectory(lib/kdev5-php)
elseif(NOT TARGET KDev::Tests)
message(STATUS "Could not find required KDevPlatform component KDev::Tests - disabling php import support")
endif()
endif()
......
......@@ -599,6 +599,14 @@ else()
${LIBXSLT_LIBRARIES}
${LIBXML2_LIBRARIES}
)
if(BUILD_PHP_IMPORT)
target_link_libraries(libumbrello
KDev::Interfaces
KDev::Language
KDev::Tests
kdevphpparser
)
endif()
ecm_add_app_icon(umbrello_SRCS
ICONS
${CMAKE_CURRENT_SOURCE_DIR}/pics/global/16-apps-umbrello.png
......
......@@ -633,8 +633,14 @@ private:
qout << endl << "problems encountered during parsing:" << endl;
foreach(KDevelop::ProblemPointer p, m_session.problems()) {
QString item = QString::fromLatin1("%1:%2:%3: %4: %5")
#if QT_VERSION > 0x050000
.arg(fileName).arg(p->finalLocation().start().line()+1)
.arg(p->finalLocation().start().column())
#else
.arg(fileName).arg(p->finalLocation().start.line+1)
.arg(p->finalLocation().start.column).arg(p->severityString()).arg(p->description());
.arg(p->finalLocation().start.column)
#endif
.arg(p->severityString()).arg(p->description());
UMLApp::app()->logWindow()->addItem(item);
}
} else {
......
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