Warning, /kdevelop/kdev-php/parser/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 if (BUILD_TESTING)
0002 add_subdirectory(test)
0003 endif()
0004
0005 set(parser_STAT_SRCS
0006 phplexer.cpp
0007 parsesession.cpp
0008 )
0009
0010 kdevpgqt_generate(parser_SRCS php NAMESPACE Php DEBUG_VISITOR TOKEN_TEXT
0011 "${CMAKE_CURRENT_SOURCE_DIR}/php.g"
0012 "${CMAKE_CURRENT_SOURCE_DIR}/phplexer.h"
0013 )
0014 ecm_qt_declare_logging_category(parser_SRCS
0015 HEADER parserdebug.h
0016 IDENTIFIER PARSER
0017 CATEGORY_NAME "kdevelop.plugins.php.parser"
0018 DESCRIPTION "KDevelop plugin: PHP language support - parser"
0019 EXPORT KDEVPHP
0020 )
0021
0022 add_library(kdevphpparser SHARED ${parser_SRCS} ${parser_STAT_SRCS})
0023
0024 generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT
0025 EXPORT_FILE_NAME parserexport.h)
0026 target_link_libraries(kdevphpparser LINK_PRIVATE
0027 KDev::Language
0028 KF5::I18n
0029 )
0030
0031 # hack to make phpdebugvisitor.h (generated at compile time)
0032 # use the correct EXPORT tags when compiling in MinGW
0033 if (MINGW)
0034 add_definitions(-DMAKE_KDEV4PHPPARSER_LIB)
0035 endif (MINGW)
0036
0037 target_include_directories(kdevphpparser
0038 PUBLIC $<INSTALL_INTERFACE:${KDEVPHP_PRIVATE_INCLUDE_DIR}/parser>
0039 PUBLIC $<INSTALL_INTERFACE:${KDEVPHP_PRIVATE_INCLUDE_DIR}>
0040 PUBLIC $<INSTALL_INTERFACE:${KDEVPHP_INCLUDE_DIR}>
0041 )
0042
0043 if (BUILD_TESTING)
0044 add_executable(php-parser main.cpp)
0045 target_link_libraries(php-parser
0046 KDev::Tests
0047 KDev::Language
0048 kdevphpparser
0049 )
0050 endif()
0051
0052 install(TARGETS kdevphpparser EXPORT KDevPHPTargets DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0053 install(FILES
0054 parsesession.h
0055 phplexer.h
0056 tokenstream.h
0057 DESTINATION ${KDEVPHP_INCLUDE_DIR}/parser
0058 COMPONENT Devel
0059 )
0060
0061 install(FILES
0062 ${CMAKE_CURRENT_BINARY_DIR}/parserexport.h
0063 ${CMAKE_CURRENT_BINARY_DIR}/phpast-fwd.h
0064 ${CMAKE_CURRENT_BINARY_DIR}/phpast.h
0065 ${CMAKE_CURRENT_BINARY_DIR}/phpdebugvisitor.h
0066 ${CMAKE_CURRENT_BINARY_DIR}/phpdefaultvisitor.h
0067 ${CMAKE_CURRENT_BINARY_DIR}/phpparser.h
0068 ${CMAKE_CURRENT_BINARY_DIR}/phptokentext.h
0069 ${CMAKE_CURRENT_BINARY_DIR}/phptokentype.h
0070 ${CMAKE_CURRENT_BINARY_DIR}/phpvisitor.h
0071 DESTINATION ${KDEVPHP_PRIVATE_INCLUDE_DIR}/parser
0072 COMPONENT Devel
0073 )