aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/FindLLQtWebkit.cmake
diff options
context:
space:
mode:
authorAleric Inglewood2010-10-15 17:49:06 +0200
committerAleric Inglewood2010-10-15 17:49:06 +0200
commit67f55bad571044535f1d8c3b3c3afb5078249fd3 (patch)
treed5e9f43ed6b44837faed947a09b13648d55087ba /linden/indra/cmake/FindLLQtWebkit.cmake
parentRevert "port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewe... (diff)
downloadmeta-impy-67f55bad571044535f1d8c3b3c3afb5078249fd3.zip
meta-impy-67f55bad571044535f1d8c3b3c3afb5078249fd3.tar.gz
meta-impy-67f55bad571044535f1d8c3b3c3afb5078249fd3.tar.bz2
meta-impy-67f55bad571044535f1d8c3b3c3afb5078249fd3.tar.xz
RED-595: Manual merge with weekly-webkit.
Plus some white space fixes (TABs --> spaces) in install.xml.
Diffstat (limited to 'linden/indra/cmake/FindLLQtWebkit.cmake')
-rw-r--r--linden/indra/cmake/FindLLQtWebkit.cmake62
1 files changed, 62 insertions, 0 deletions
diff --git a/linden/indra/cmake/FindLLQtWebkit.cmake b/linden/indra/cmake/FindLLQtWebkit.cmake
new file mode 100644
index 0000000..c747ec3
--- /dev/null
+++ b/linden/indra/cmake/FindLLQtWebkit.cmake
@@ -0,0 +1,62 @@
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.
18include(FindPkgConfig)
19if (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})
31endif (PKG_CONFIG_FOUND)
32set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
33
34find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
35
36find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
37
38if (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)
41endif (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.
45include(FindPackageHandleStandardArgs)
46find_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
55mark_as_advanced(
56 LLQTWEBKIT_LIBRARY
57 LLQTWEBKIT_INCLUDE_DIR
58 LLQTWEBKIT_LIBRARIES
59 LLQTWEBKIT_LIBRARY_DIRS
60 LLQTWEBKIT_DEFINITIONS
61 )
62