diff options
Diffstat (limited to 'linden/indra/cmake/WebKitLibPlugin.cmake')
-rw-r--r-- | linden/indra/cmake/WebKitLibPlugin.cmake | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/linden/indra/cmake/WebKitLibPlugin.cmake b/linden/indra/cmake/WebKitLibPlugin.cmake new file mode 100644 index 0000000..a4befa4 --- /dev/null +++ b/linden/indra/cmake/WebKitLibPlugin.cmake | |||
@@ -0,0 +1,79 @@ | |||
1 | # -*- cmake -*- | ||
2 | include(Linking) | ||
3 | include(Prebuilt) | ||
4 | |||
5 | if (STANDALONE) | ||
6 | # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny. | ||
7 | find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED) | ||
8 | include(${QT_USE_FILE}) | ||
9 | set(QTDIR $ENV{QTDIR}) | ||
10 | if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin") | ||
11 | message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; " | ||
12 | "Qt is found by looking for qmake in your PATH. " | ||
13 | "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, " | ||
14 | "or unset QTDIR if the found Qt is correct.") | ||
15 | endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin") | ||
16 | find_package(LLQtWebkit REQUIRED QUIET) | ||
17 | # Add the plugins. | ||
18 | set(QT_PLUGIN_LIBRARIES) | ||
19 | foreach(qlibname qgif qjpeg) | ||
20 | find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH) | ||
21 | if (QT_PLUGIN_${qlibname}) | ||
22 | list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}}) | ||
23 | else (QT_PLUGIN_${qtlibname}) | ||
24 | message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!") | ||
25 | endif (QT_PLUGIN_${qlibname}) | ||
26 | endforeach(qlibname) | ||
27 | # qjpeg depends on libjpeg | ||
28 | list(APPEND QT_PLUGIN_LIBRARIES jpeg) | ||
29 | set(WEBKITLIBPLUGIN OFF CACHE BOOL | ||
30 | "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") | ||
31 | else (STANDALONE) | ||
32 | use_prebuilt_binary(llqtwebkit) | ||
33 | set(WEBKITLIBPLUGIN ON CACHE BOOL | ||
34 | "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") | ||
35 | endif (STANDALONE) | ||
36 | |||
37 | if (WINDOWS) | ||
38 | set(WEBKIT_PLUGIN_LIBRARIES | ||
39 | debug llqtwebkitd | ||
40 | debug QtWebKitd4 | ||
41 | debug QtOpenGLd4 | ||
42 | debug QtNetworkd4 | ||
43 | debug QtGuid4 | ||
44 | debug QtCored4 | ||
45 | debug qtmaind | ||
46 | optimized llqtwebkit | ||
47 | optimized QtWebKit4 | ||
48 | optimized QtOpenGL4 | ||
49 | optimized QtNetwork4 | ||
50 | optimized QtGui4 | ||
51 | optimized QtCore4 | ||
52 | optimized qtmain | ||
53 | ) | ||
54 | elseif (DARWIN) | ||
55 | set(WEBKIT_PLUGIN_LIBRARIES | ||
56 | optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib | ||
57 | debug ${ARCH_PREBUILT_DIRS_DEBUG}/libllqtwebkit.dylib | ||
58 | ) | ||
59 | elseif (LINUX) | ||
60 | if (STANDALONE) | ||
61 | set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES}) | ||
62 | else (STANDALONE) | ||
63 | set(WEBKIT_PLUGIN_LIBRARIES | ||
64 | llqtwebkit | ||
65 | qgif | ||
66 | qjpeg | ||
67 | QtWebKit | ||
68 | QtOpenGL | ||
69 | QtNetwork | ||
70 | QtGui | ||
71 | QtCore | ||
72 | jpeg | ||
73 | fontconfig | ||
74 | X11 | ||
75 | Xrender | ||
76 | GL | ||
77 | ) | ||
78 | endif (STANDALONE) | ||
79 | endif (WINDOWS) | ||