Changeset View
Changeset View
Standalone View
Standalone View
parser/CMakeLists.txt
Show All 20 Lines | |||||
21 | 21 | | |||
22 | generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT | 22 | generate_export_header(kdevphpparser EXPORT_MACRO_NAME KDEVPHPPARSER_EXPORT | ||
23 | EXPORT_FILE_NAME parserexport.h) | 23 | EXPORT_FILE_NAME parserexport.h) | ||
24 | target_link_libraries(kdevphpparser LINK_PRIVATE | 24 | target_link_libraries(kdevphpparser LINK_PRIVATE | ||
25 | KDev::Language | 25 | KDev::Language | ||
26 | KF5::I18n | 26 | KF5::I18n | ||
27 | ) | 27 | ) | ||
28 | 28 | | |||
29 | # hack to make phpdebugvisitor.h (generated at compile time) | 29 | # hack to make phpdebugvisitor.h (generated at compile time) | ||
kfunk: Can be merged in one single `target_include_directories(...)` call. | |||||
30 | # use the correct EXPORT tags when compiling in MinGW | 30 | # use the correct EXPORT tags when compiling in MinGW | ||
31 | if (MINGW) | 31 | if (MINGW) | ||
32 | add_definitions(-DMAKE_KDEV4PHPPARSER_LIB) | 32 | add_definitions(-DMAKE_KDEV4PHPPARSER_LIB) | ||
33 | endif (MINGW) | 33 | endif (MINGW) | ||
34 | 34 | | |||
35 | target_include_directories(kdevphpparser | ||||
36 | PUBLIC $<INSTALL_INTERFACE:${KDEVPHP_PRIVATE_INCLUDE_DIR}/parser> | ||||
37 | PUBLIC $<INSTALL_INTERFACE:${KDEVPHP_PRIVATE_INCLUDE_DIR}> | ||||
38 | PUBLIC $<INSTALL_INTERFACE:${KDEVPHP_INCLUDE_DIR}> | ||||
39 | ) | ||||
40 | | ||||
35 | if (BUILD_TESTING) | 41 | if (BUILD_TESTING) | ||
36 | add_executable(php-parser main.cpp) | 42 | add_executable(php-parser main.cpp) | ||
37 | target_link_libraries(php-parser | 43 | target_link_libraries(php-parser | ||
38 | KDev::Tests | 44 | KDev::Tests | ||
39 | KDev::Language | 45 | KDev::Language | ||
40 | kdevphpparser | 46 | kdevphpparser | ||
41 | ) | 47 | ) | ||
42 | endif() | 48 | endif() | ||
43 | 49 | | |||
44 | install(TARGETS kdevphpparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) | 50 | install(TARGETS kdevphpparser EXPORT KDevPHPTargets DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) | ||
51 | install(FILES | ||||
52 | parsesession.h | ||||
53 | phplexer.h | ||||
Seems a bit odd to me to install the grammar file. Afaics phpparser.h is generated from it and should have everything one needs, no? pprkut: Seems a bit odd to me to install the grammar file. Afaics phpparser.h is generated from it and… | |||||
kfunk: +1 | |||||
54 | tokenstream.h | ||||
55 | DESTINATION ${KDEVPHP_INCLUDE_DIR}/parser | ||||
56 | COMPONENT Devel | ||||
57 | ) | ||||
58 | | ||||
59 | install(FILES | ||||
60 | ${CMAKE_CURRENT_BINARY_DIR}/parserexport.h | ||||
61 | ${CMAKE_CURRENT_BINARY_DIR}/phpast-fwd.h | ||||
62 | ${CMAKE_CURRENT_BINARY_DIR}/phpast.h | ||||
63 | ${CMAKE_CURRENT_BINARY_DIR}/phpdebugvisitor.h | ||||
64 | ${CMAKE_CURRENT_BINARY_DIR}/phpdefaultvisitor.h | ||||
65 | ${CMAKE_CURRENT_BINARY_DIR}/phpparser.h | ||||
66 | ${CMAKE_CURRENT_BINARY_DIR}/phptokentext.h | ||||
67 | ${CMAKE_CURRENT_BINARY_DIR}/phptokentype.h | ||||
68 | ${CMAKE_CURRENT_BINARY_DIR}/phpvisitor.h | ||||
69 | DESTINATION ${KDEVPHP_PRIVATE_INCLUDE_DIR}/parser | ||||
70 | COMPONENT Devel | ||||
71 | ) |
Can be merged in one single target_include_directories(...) call.