~ubuntu-branches/ubuntu/utopic/kdevelop-php/utopic

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2010-01-17 17:10:22 UTC
  • Revision ID: james.westby@ubuntu.com-20100117171022-q2xlgd9ekewo2ijx
Tags: upstream-1.0.0~beta2
ImportĀ upstreamĀ versionĀ 1.0.0~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
PROJECT(php)
 
2
 
 
3
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${php_SOURCE_DIR}/cmake/)
 
4
enable_testing()
 
5
 
 
6
#To properly find kdevelop-pg add -DKDEVPG_DATA_DIR=<kdevpg-install-path>/share to the
 
7
#cmake run if you installed it in a different directory than this plugin
 
8
#TODO: a cmake run is needed after changing one of the CMakeLists.txt, make will
 
9
#complain about the FindKDevelop-PG.cmake file not findable.
 
10
find_package(KDE4 REQUIRED)
 
11
 
 
12
find_package(KDevPlatform REQUIRED)
 
13
include_directories(
 
14
    ${KDEVPLATFORM_INCLUDE_DIR}
 
15
    ${KDE4_INCLUDES}
 
16
    ${KDE4_INCLUDE_DIR}/threadweaver
 
17
    ${CMAKE_CURRENT_BINARY_DIR}
 
18
    ${CMAKE_CURRENT_SOURCE_DIR}
 
19
    ${CMAKE_CURRENT_SOURCE_DIR}/duchain
 
20
    ${CMAKE_CURRENT_SOURCE_DIR}/parser
 
21
    ${CMAKE_CURRENT_BINARY_DIR}/parser
 
22
)
 
23
 
 
24
add_definitions( -DKDE_DEFAULT_DEBUG_AREA=9043 )
 
25
 
 
26
#Don't error out if the FindXXX are missing for these two
 
27
find_package(KDevelop-PG-Qt QUIET)
 
28
 
 
29
if(KDEVPGQT_FOUND)
 
30
    include_directories(
 
31
        ${CMAKE_BINARY_DIR}/parser
 
32
        ${KDEVPGQT_INCLUDE_DIR}
 
33
    )
 
34
else(KDEVPGQT_FOUND)
 
35
    include_directories(
 
36
        ${CMAKE_CURRENT_SOURCE_DIR}/parser/generated
 
37
        ${CMAKE_CURRENT_SOURCE_DIR}/parser/generated/kdevelop-pg-qt
 
38
    )
 
39
endif(KDEVPGQT_FOUND)
 
40
 
 
41
add_subdirectory(app_templates)
 
42
add_subdirectory(parser)
 
43
add_subdirectory(duchain)
 
44
add_subdirectory(completion)
 
45
 
 
46
set(kdevphplanguagesupport_PART_SRCS
 
47
    phplanguagesupport.cpp
 
48
    phpparsejob.cpp
 
49
    #phphighlighting.cpp
 
50
)
 
51
 
 
52
kde4_add_plugin(kdevphplanguagesupport ${kdevphplanguagesupport_PART_SRCS})
 
53
 
 
54
target_link_libraries(kdevphplanguagesupport
 
55
    ${KDE4_KDEUI_LIBS}
 
56
    ${KDEVPLATFORM_INTERFACES_LIBRARIES}
 
57
    ${KDEVPLATFORM_LANGUAGE_LIBRARIES}
 
58
    ${KDE4_THREADWEAVER_LIBRARIES}
 
59
    ${KDE4_KTEXTEDITOR_LIBS}
 
60
    kdev4phpduchain
 
61
    kdev4phpparser
 
62
    kdev4phpcompletion
 
63
)
 
64
 
 
65
install(TARGETS kdevphplanguagesupport DESTINATION ${PLUGIN_INSTALL_DIR})
 
66
 
 
67
install(FILES kdevphpsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR})
 
68
install(FILES phpfunctions.php DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport)