diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index 6b544dc..a746742 100644 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -1,71 +1,71 @@ if (BUILD_TESTING) add_subdirectory(test) endif() set(parser_STAT_SRCS phplexer.cpp parsesession.cpp ) kdevpgqt_generate(parser_SRCS php NAMESPACE Php DEBUG_VISITOR TOKEN_TEXT - "${php_SOURCE_DIR}/parser/php.g" - "${php_SOURCE_DIR}/parser/phplexer.h" + "${CMAKE_CURRENT_SOURCE_DIR}/php.g" + "${CMAKE_CURRENT_SOURCE_DIR}/phplexer.h" ) ecm_qt_declare_logging_category(parser_SRCS HEADER parserdebug.h IDENTIFIER PARSER CATEGORY_NAME "kdevelop.languages.php.parser" ) add_library(kdevphpparser SHARED ${parser_SRCS} ${parser_STAT_SRCS}) generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT EXPORT_FILE_NAME parserexport.h) target_link_libraries(kdevphpparser LINK_PRIVATE KDev::Language KF5::I18n ) # hack to make phpdebugvisitor.h (generated at compile time) # use the correct EXPORT tags when compiling in MinGW if (MINGW) add_definitions(-DMAKE_KDEV4PHPPARSER_LIB) endif (MINGW) target_include_directories(kdevphpparser PUBLIC $ PUBLIC $ PUBLIC $ ) if (BUILD_TESTING) add_executable(php-parser main.cpp) target_link_libraries(php-parser KDev::Tests KDev::Language kdevphpparser ) endif() install(TARGETS kdevphpparser EXPORT KDevPHPTargets DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES parsesession.h phplexer.h tokenstream.h DESTINATION ${KDEVPHP_INCLUDE_DIR}/parser COMPONENT Devel ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/parserexport.h ${CMAKE_CURRENT_BINARY_DIR}/phpast-fwd.h ${CMAKE_CURRENT_BINARY_DIR}/phpast.h ${CMAKE_CURRENT_BINARY_DIR}/phpdebugvisitor.h ${CMAKE_CURRENT_BINARY_DIR}/phpdefaultvisitor.h ${CMAKE_CURRENT_BINARY_DIR}/phpparser.h ${CMAKE_CURRENT_BINARY_DIR}/phptokentext.h ${CMAKE_CURRENT_BINARY_DIR}/phptokentype.h ${CMAKE_CURRENT_BINARY_DIR}/phpvisitor.h DESTINATION ${KDEVPHP_PRIVATE_INCLUDE_DIR}/parser COMPONENT Devel )