~ubuntu-branches/ubuntu/karmic/webkitkde/karmic

« back to all changes in this revision

Viewing changes to part/cmake/modules/.svn/text-base/FindWebKitPart.cmake.svn-base

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2009-09-15 18:12:02 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20090915181202-equagky8i9llid88
Tags: 0.1~svn1023063-0ubuntu1
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Try to find WebKitPart
 
2
# Once done this will define
 
3
#
 
4
#  WEBKITPART_FOUND - system has WebKitPart
 
5
#  WEBKITPART_INCLUDE_DIR - the WebKitPart include directory
 
6
#  WEBKITPART_LIBRARIES - Link these to use WebKitPart
 
7
#  WEBKITPART_DEFINITIONS - Compiler switches required for using WebKitPart
 
8
# Redistribution and use is allowed according to the terms of the BSD license.
 
9
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
10
#
 
11
 
 
12
 
 
13
if ( WEBKITPART_INCLUDE_DIR AND WEBKITPART_LIBRARIES )
 
14
   # in cache already
 
15
   SET(WebKitPart_FIND_QUIETLY TRUE)
 
16
endif ( WEBKITPART_INCLUDE_DIR AND WEBKITPART_LIBRARIES )
 
17
 
 
18
# Little trick I found in FindKDE4Interal... If we're building WebKitPart, set the variables to point to the build directory.
 
19
if(webkitpart_SOURCE_DIR)
 
20
    set(WEBKITPART_LIBRARIES webkitkpart)
 
21
    set(WEBKITPART_INCLUDE_DIR ${CMAKE_SOURCE_DIR})
 
22
endif(webkitpart_SOURCE_DIR)
 
23
 
 
24
# use pkg-config to get the directories and then use these values
 
25
# in the FIND_PATH() and FIND_LIBRARY() calls
 
26
if( NOT WIN32 )
 
27
  find_package(PkgConfig)
 
28
 
 
29
  pkg_check_modules(PC_WEBKITPART webkitpart)
 
30
 
 
31
  set(PCRE_DEFINITIONS ${PC_WEBKITPART_CFLAGS_OTHER})
 
32
endif( NOT WIN32 )
 
33
 
 
34
FIND_PATH(WEBKITPART_INCLUDE_DIR NAMES webkitpart.h
 
35
  PATHS
 
36
  ${PC_WEBKITPART_INCLUDEDIR} 
 
37
  ${PC_WEBKITPART_INCLUDE_DIRS}
 
38
  ${KDE4_INCLUDE_INSTALL_DIR}
 
39
  PATH_SUFFIXES webkitkde
 
40
)
 
41
 
 
42
FIND_LIBRARY(WEBKITPART_LIBRARIES NAMES webkitkde
 
43
  PATHS
 
44
  ${PC_WEBKITPART_LIBDIR} 
 
45
  ${PC_WEBKITPART_LIBRARY_DIRS}
 
46
  ${KDE4_LIB_INSTALL_DIR}
 
47
)
 
48
 
 
49
include(FindPackageHandleStandardArgs)
 
50
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebKitPart DEFAULT_MSG WEBKITPART_INCLUDE_DIR WEBKITPART_LIBRARIES )
 
51
 
 
52
# show the WEBKITPART_INCLUDE_DIR and WEBKITPART_LIBRARIES variables only in the advanced view
 
53
MARK_AS_ADVANCED(WEBKITPART_INCLUDE_DIR WEBKITPART_LIBRARIES)
 
54