PageRenderTime 14ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/cmake/WebKitLibPlugin.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 85 lines | 70 code | 3 blank | 12 comment | 10 complexity | 9ab4feadc3b853d1cd5daa644e59c6f2 MD5 | raw file
 1# -*- cmake -*-
 2include(Linking)
 3include(Prebuilt)
 4
 5if (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.")
31else (STANDALONE)
32    use_prebuilt_binary(llqtwebkit)
33    set(WEBKITLIBPLUGIN ON CACHE BOOL
34        "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
35endif (STANDALONE)
36
37if (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    )
54elseif (DARWIN)
55    set(WEBKIT_PLUGIN_LIBRARIES
56        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
57        debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
58        )
59elseif (LINUX)
60    set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
61    set(WEBKIT_PLUGIN_LIBRARIES
62        llqtwebkit
63#        qico
64#        qpng
65#        qtiff
66#        qsvg
67#        QtSvg
68        QtWebKit
69        QtOpenGL
70        QtNetwork
71        QtGui
72        QtCore
73        qgif
74        qjpeg
75        jpeg
76        fontconfig
77        X11
78        Xrender
79        GL
80
81#        sqlite3
82#        Xi
83#        SM
84        )
85endif (WINDOWS)