PageRenderTime 73ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/media_plugins/webkit/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 129 lines | 102 code | 21 blank | 6 comment | 7 complexity | 62fb327840c63f5801443c9bc8b7d79d MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. project(media_plugin_webkit)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLImage)
  6. include(LLPlugin)
  7. include(LLMath)
  8. include(LLRender)
  9. include(LLWindow)
  10. include(UI)
  11. include(Linking)
  12. include(PluginAPI)
  13. include(MediaPluginBase)
  14. include(FindOpenGL)
  15. include(PulseAudio)
  16. include(WebKitLibPlugin)
  17. include_directories(
  18. ${PULSEAUDIO_INCLUDE_DIRS}
  19. ${LLPLUGIN_INCLUDE_DIRS}
  20. ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
  21. ${LLCOMMON_INCLUDE_DIRS}
  22. ${LLMATH_INCLUDE_DIRS}
  23. ${LLIMAGE_INCLUDE_DIRS}
  24. ${LLRENDER_INCLUDE_DIRS}
  25. ${LLWINDOW_INCLUDE_DIRS}
  26. ${LLQTWEBKIT_INCLUDE_DIR}
  27. )
  28. ### media_plugin_webkit
  29. if(NOT WORD_SIZE EQUAL 32)
  30. if(WINDOWS)
  31. add_definitions(/FIXED:NO)
  32. else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
  33. add_definitions(-fPIC)
  34. endif(WINDOWS)
  35. endif(NOT WORD_SIZE EQUAL 32)
  36. set(media_plugin_webkit_SOURCE_FILES
  37. media_plugin_webkit.cpp
  38. )
  39. set(media_plugin_webkit_HEADER_FILES
  40. volume_catcher.h
  41. )
  42. set(media_plugin_webkit_LINK_LIBRARIES
  43. ${LLPLUGIN_LIBRARIES}
  44. ${MEDIA_PLUGIN_BASE_LIBRARIES}
  45. ${LLCOMMON_LIBRARIES}
  46. ${WEBKIT_PLUGIN_LIBRARIES}
  47. ${PLUGIN_API_WINDOWS_LIBRARIES}
  48. ${PULSEAUDIO_LIBRARIES}
  49. )
  50. # Select which VolumeCatcher implementation to use
  51. if (LINUX)
  52. if (PULSEAUDIO_FOUND)
  53. list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp)
  54. else (PULSEAUDIO_FOUND)
  55. list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp)
  56. endif (PULSEAUDIO_FOUND)
  57. list(APPEND media_plugin_webkit_LINK_LIBRARIES
  58. ${UI_LIBRARIES} # for glib/GTK
  59. )
  60. elseif (DARWIN)
  61. list(APPEND media_plugin_webkit_SOURCE_FILES mac_volume_catcher.cpp)
  62. find_library(CORESERVICES_LIBRARY CoreServices)
  63. find_library(AUDIOUNIT_LIBRARY AudioUnit)
  64. list(APPEND media_plugin_webkit_LINK_LIBRARIES
  65. ${CORESERVICES_LIBRARY} # for Component Manager calls
  66. ${AUDIOUNIT_LIBRARY} # for AudioUnit calls
  67. )
  68. elseif (WINDOWS)
  69. list(APPEND media_plugin_webkit_SOURCE_FILES windows_volume_catcher.cpp)
  70. endif (LINUX)
  71. set_source_files_properties(${media_plugin_webkit_HEADER_FILES}
  72. PROPERTIES HEADER_FILE_ONLY TRUE)
  73. list(APPEND media_plugin_webkit_SOURCE_FILES ${media_plugin_webkit_HEADER_FILES})
  74. add_library(media_plugin_webkit
  75. SHARED
  76. ${media_plugin_webkit_SOURCE_FILES}
  77. )
  78. target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES})
  79. add_dependencies(media_plugin_webkit
  80. ${LLPLUGIN_LIBRARIES}
  81. ${MEDIA_PLUGIN_BASE_LIBRARIES}
  82. ${LLCOMMON_LIBRARIES}
  83. )
  84. if (WINDOWS)
  85. set_target_properties(
  86. media_plugin_webkit
  87. PROPERTIES
  88. LINK_FLAGS "/MANIFEST:NO"
  89. )
  90. endif (WINDOWS)
  91. if (DARWIN)
  92. # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
  93. set_target_properties(
  94. media_plugin_webkit
  95. PROPERTIES
  96. PREFIX ""
  97. BUILD_WITH_INSTALL_RPATH 1
  98. INSTALL_NAME_DIR "@executable_path"
  99. LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
  100. )
  101. # copy the webkit dylib to the build directory
  102. add_custom_command(
  103. TARGET media_plugin_webkit POST_BUILD
  104. # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllqtwebkit.dylib
  105. COMMAND ${CMAKE_COMMAND} -E copy ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
  106. DEPENDS media_plugin_webkit ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
  107. )
  108. endif (DARWIN)