|
|
1 |
# -*- cmake -*-
|
|
|
2 |
|
|
|
3 |
# - Find llqtwebkit
|
|
|
4 |
# Find the llqtwebkit includes and library
|
|
|
5 |
# This module defines
|
|
|
6 |
# LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
|
|
|
7 |
# LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
|
|
|
8 |
# LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
|
|
|
9 |
# also defined, but not for general use are
|
|
|
10 |
# LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
|
|
|
11 |
# LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
|
|
|
12 |
# LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
|
|
|
13 |
# before compiling code that includes llqtwebkit library files.
|
|
|
14 |
|
|
|
15 |
# Try to use pkg-config first.
|
|
|
16 |
# This allows to have two different libllqtwebkit packages installed:
|
|
|
17 |
# one for viewer 2.x and one for viewer 1.x.
|
|
|
18 |
include(FindPkgConfig)
|
|
|
19 |
if (PKG_CONFIG_FOUND)
|
|
|
20 |
if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
|
|
21 |
set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
|
|
|
22 |
else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
|
|
23 |
set(_PACKAGE_ARGS libllqtwebkit)
|
|
|
24 |
endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
|
|
|
25 |
if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
|
|
|
26 |
# As virtually nobody will have a pkg-config file for this, do this check always quiet.
|
|
|
27 |
# Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
|
|
|
28 |
set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
|
|
|
29 |
endif ()
|
|
|
30 |
pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
|
|
|
31 |
endif (PKG_CONFIG_FOUND)
|
|
|
32 |
set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
|
|
|
33 |
|
|
|
34 |
find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
|
|
|
35 |
|
|
|
36 |
find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
|
|
|
37 |
|
|
|
38 |
if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
|
|
|
39 |
set(LLQTWEBKIT_LIBRARIES llqtwebkit)
|
|
|
40 |
get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
|
|
|
41 |
endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
|
|
|
42 |
|
|
|
43 |
# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
|
|
|
44 |
# to TRUE if all listed variables are TRUE.
|
|
|
45 |
include(FindPackageHandleStandardArgs)
|
|
|
46 |
find_package_handle_standard_args(
|
|
|
47 |
LLQTWEBKIT
|
|
|
48 |
DEFAULT_MSG
|
|
|
49 |
LLQTWEBKIT_LIBRARY
|
|
|
50 |
LLQTWEBKIT_INCLUDE_DIR
|
|
|
51 |
LLQTWEBKIT_LIBRARIES
|
|
|
52 |
LLQTWEBKIT_LIBRARY_DIRS
|
|
|
53 |
)
|
|
|
54 |
|
|
|
55 |
mark_as_advanced(
|
|
|
56 |
LLQTWEBKIT_LIBRARY
|
|
|
57 |
LLQTWEBKIT_INCLUDE_DIR
|
|
|
58 |
LLQTWEBKIT_LIBRARIES
|
|
|
59 |
LLQTWEBKIT_LIBRARY_DIRS
|
|
|
60 |
LLQTWEBKIT_DEFINITIONS
|
|
|
61 |
)
|
|
|
62 |
|
Other reviews