summaryrefslogtreecommitdiff
path: root/indra/cmake/WebKitLibPlugin.cmake
diff options
context:
space:
mode:
authorAleric Inglewood <Aleric.Inglewood@gmail.com>2010-12-15 20:12:17 +0100
committerAleric Inglewood <Aleric.Inglewood@gmail.com>2010-12-15 20:12:17 +0100
commitd0a25a41848142e469f5d64f4e4cef3852d3b2ab (patch)
tree5e7c5e0e6b7ad37534aab5758f932c4b3073956b /indra/cmake/WebKitLibPlugin.cmake
parent0de05499eddd2afbd69b5f247d4cffdee448db19 (diff)
VWR-24252: On standalone, find Qt4 with find_package, and find llqtwebkit.
If Qt and/or llqtwebkit is found in a non-standard place, you still have to set LD_LIBRARY_PATH yourself (to $QTDIR/lib) before running the viewer of course (or the webkit plugin will silently fail).
Diffstat (limited to 'indra/cmake/WebKitLibPlugin.cmake')
-rw-r--r--indra/cmake/WebKitLibPlugin.cmake25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake
index 12ba1b1b35..1f5b0f5d84 100644
--- a/indra/cmake/WebKitLibPlugin.cmake
+++ b/indra/cmake/WebKitLibPlugin.cmake
@@ -3,6 +3,29 @@ include(Linking)
include(Prebuilt)
if (STANDALONE)
+ # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny.
+ find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED)
+ include(${QT_USE_FILE})
+ set(QTDIR $ENV{QTDIR})
+ if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+ message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
+ "Qt is found by looking for qmake in your PATH. "
+ "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
+ "or unset QTDIR if the found Qt is correct.")
+ endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+ find_package(LLQtWebkit REQUIRED QUIET)
+ # Add the plugins.
+ set(QT_PLUGIN_LIBRARIES)
+ foreach(qlibname qgif qjpeg)
+ find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
+ if (QT_PLUGIN_${qlibname})
+ list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
+ else (QT_PLUGIN_${qtlibname})
+ message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
+ endif (QT_PLUGIN_${qlibname})
+ endforeach(qlibname)
+ # qjpeg depends on libjpeg
+ list(APPEND QT_PLUGIN_LIBRARIES jpeg)
set(WEBKITLIBPLUGIN OFF CACHE BOOL
"WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
else (STANDALONE)
@@ -35,7 +58,7 @@ elseif (DARWIN)
)
elseif (LINUX)
if (STANDALONE)
- set(WEBKIT_PLUGIN_LIBRARIES llqtwebkit)
+ set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
else (STANDALONE)
set(WEBKIT_PLUGIN_LIBRARIES
llqtwebkit