Commit e54c21b7 authored by Ralf Habacker's avatar Ralf Habacker

kdev-php fixes for embedding into umbrello source

CCBUG:388428
parent 2e74b748
...@@ -36,8 +36,11 @@ include_directories( ...@@ -36,8 +36,11 @@ include_directories(
${KDEVPGQT_INCLUDE_DIR} ${KDEVPGQT_INCLUDE_DIR}
) )
if(NOT BUILD_PARSER_ONLY)
add_subdirectory(app_templates) add_subdirectory(app_templates)
endif()
add_subdirectory(parser) add_subdirectory(parser)
if(NOT BUILD_PARSER_ONLY)
add_subdirectory(duchain) add_subdirectory(duchain)
add_subdirectory(completion) add_subdirectory(completion)
add_subdirectory(testprovider) add_subdirectory(testprovider)
...@@ -64,8 +67,11 @@ target_link_libraries(kdevphplanguagesupport ...@@ -64,8 +67,11 @@ target_link_libraries(kdevphplanguagesupport
KF5::I18n KF5::I18n
KF5::TextEditor KF5::TextEditor
) )
endif()
# not writeable so that the refactoring actions get hidden # not writeable so that the refactoring actions get hidden
install(FILES phpfunctions.php DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) if(NOT NO_INSTALL)
install(FILES phpfunctions.php DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
...@@ -13,8 +13,18 @@ kdevpgqt_generate(parser_SRCS php NAMESPACE Php DEBUG_VISITOR TOKEN_TEXT ...@@ -13,8 +13,18 @@ kdevpgqt_generate(parser_SRCS php NAMESPACE Php DEBUG_VISITOR TOKEN_TEXT
"${php_SOURCE_DIR}/parser/phplexer.h" "${php_SOURCE_DIR}/parser/phplexer.h"
) )
if(NO_INSTALL)
add_library(kdevphpparser SHARED ${parser_SRCS} ${parser_STAT_SRCS}) list(APPEND parser_STAT_SRCS
${CMAKE_CURRENT_BINARY_DIR}/phpvisitor.cpp
${CMAKE_CURRENT_BINARY_DIR}/phpdefaultvisitor.cpp
${CMAKE_CURRENT_BINARY_DIR}/phpvisitor.h
${CMAKE_CURRENT_BINARY_DIR}/phpdefaultvisitor.h
${CMAKE_CURRENT_BINARY_DIR}/phpdebugvisitor.h
)
add_library(kdevphpparser STATIC ${parser_SRCS} ${parser_STAT_SRCS})
else()
add_library(kdevphpparser SHARED ${parser_SRCS} ${parser_STAT_SRCS})
endif()
generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT
EXPORT_FILE_NAME parserexport.h) EXPORT_FILE_NAME parserexport.h)
...@@ -31,5 +41,6 @@ if(BUILD_TESTING) ...@@ -31,5 +41,6 @@ if(BUILD_TESTING)
kdevphpparser kdevphpparser
) )
endif() endif()
if(NOT NO_INSTALL)
install(TARGETS kdevphpparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kdevphpparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
endif()
...@@ -73,6 +73,7 @@ namespace KDevelop ...@@ -73,6 +73,7 @@ namespace KDevelop
%parser_declaration_header "tokenstream.h" %parser_declaration_header "tokenstream.h"
%parser_declaration_header "QtCore/QString" %parser_declaration_header "QtCore/QString"
%parser_declaration_header "language/duchain/problem.h" %parser_declaration_header "language/duchain/problem.h"
%parser_declaration_header "language/editor/documentrange.h"
%parser_declaration_header "phplexer.h" %parser_declaration_header "phplexer.h"
%parser_bits_header "parserdebug.h" %parser_bits_header "parserdebug.h"
......
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