1
# - Try to find WebKitPart
2
# Once done this will define
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.
13
if ( WEBKITPART_INCLUDE_DIR AND WEBKITPART_LIBRARIES )
15
SET(WebKitPart_FIND_QUIETLY TRUE)
16
endif ( WEBKITPART_INCLUDE_DIR AND WEBKITPART_LIBRARIES )
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)
24
# use pkg-config to get the directories and then use these values
25
# in the FIND_PATH() and FIND_LIBRARY() calls
27
find_package(PkgConfig)
29
pkg_check_modules(PC_WEBKITPART webkitpart)
31
set(PCRE_DEFINITIONS ${PC_WEBKITPART_CFLAGS_OTHER})
34
FIND_PATH(WEBKITPART_INCLUDE_DIR NAMES webkitpart.h
36
${PC_WEBKITPART_INCLUDEDIR}
37
${PC_WEBKITPART_INCLUDE_DIRS}
38
${KDE4_INCLUDE_INSTALL_DIR}
39
PATH_SUFFIXES webkitkde
42
FIND_LIBRARY(WEBKITPART_LIBRARIES NAMES webkitkde
44
${PC_WEBKITPART_LIBDIR}
45
${PC_WEBKITPART_LIBRARY_DIRS}
46
${KDE4_LIB_INSTALL_DIR}
49
include(FindPackageHandleStandardArgs)
50
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebKitPart DEFAULT_MSG WEBKITPART_INCLUDE_DIR WEBKITPART_LIBRARIES )
52
# show the WEBKITPART_INCLUDE_DIR and WEBKITPART_LIBRARIES variables only in the advanced view
53
MARK_AS_ADVANCED(WEBKITPART_INCLUDE_DIR WEBKITPART_LIBRARIES)