File: FindKDevelop.cmake

package info (click to toggle)
kdevelop 4%3A4.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 18,064 kB
  • ctags: 8,825
  • sloc: cpp: 76,399; python: 920; lex: 422; ruby: 120; sh: 85; makefile: 49; xml: 42
file content (66 lines) | stat: -rw-r--r-- 2,251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Find the KDevelop include dir
#
# KDEVELOP_INCLUDE_DIR 
# adjust the directories where the kdevelop headers
#
# KDEVELOP_FOUND - set to TRUE if kdevelop was found 
#                      FALSE otherwise
#
# KDEVELOP_INCLUDE_DIR         - include dir of kdevelop, for example /usr/include/kdevelop
#                                    can be set by the user to select different include dirs
#
# Copyright (c) 2007 Andreas Pakulat <apaku@gmx.de>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if( KDEVELOP_INCLUDE_DIR)
    set(KDevelop_FIND_QUIETLY TRUE)
endif( KDEVELOP_INCLUDE_DIR )

if(WIN32)
    file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
    set(_KDEVELOP_INCLUDE_DIR ${KDE4_INCLUDE_DIR} ${_progFiles}/kdevelop/include)
endif(WIN32)

if( NOT KDEVELOP_INCLUDE_DIR )
    find_path( _kdevIncDir kdevelop/make/imakebuilder.h
        PATHS
        ${CMAKE_INSTALL_PREFIX}/include
        ${_KDEVELOP_INCLUDE_DIR}
	${KDE4_INCLUDE_DIR}
    )
    if(_kdevIncDir)
        set(KDEVELOP_INCLUDE_DIR ${_kdevIncDir}/kdevelop)
        set(KDEVELOP_INCLUDE_DIR ${KDEVELOP_INCLUDE_DIR} CACHE PATH "kdevelop include directory containing the various platform modules")
    endif(_kdevIncDir)
else( NOT KDEVELOP_INCLUDE_DIR )
    set(KDEVELOP_INCLUDE_DIR ${KDEVELOP_INCLUDE_DIR} CACHE PATH "kdevelop include directory containing the various platform modules")
endif( NOT KDEVELOP_INCLUDE_DIR )

if( KDEVELOP_INCLUDE_DIR )

    if( NOT KDevelop_FIND_QUIETLY )
        message(STATUS "Found KDevelop include dir")
    endif( NOT KDevelop_FIND_QUIETLY )

# if all modules found
    set(KDEVELOP_FOUND TRUE)

else( KDEVELOP_INCLUDE_DIR )

    message(STATUS "You can set KDEVELOP_INCLUDE_DIR to help cmake find KDevelop")
    if( KDevelop_FIND_REQUIRED)
        message(FATAL_ERROR "Couldn't find KDevelop include dir.")
    else( KDevelop_FIND_REQUIRED)
        message(STATUS "Couldn't find KDevelop include dir.")
    endif( KDevelop_FIND_REQUIRED)
# not all platform modules found
    set(KDEVELOP_FOUND FALSE)

endif(KDEVELOP_INCLUDE_DIR )

if(KDEVELOP_FOUND)
    message(STATUS "Using kdevelop include dir: ${KDEVELOP_INCLUDE_DIR}")
endif(KDEVELOP_FOUND)