CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # -*- cmake -*-
  2. project(media_plugin_cef)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLFilesystem)
  6. include(LLPlugin)
  7. include(LLMath)
  8. include(LLRender)
  9. include(LLWindow)
  10. include(Linking)
  11. include(MediaPluginBase)
  12. include(FindOpenGL)
  13. include(CEFPlugin)
  14. ### media_plugin_cef
  15. if (NOT WINDOWS)
  16. add_definitions(-fPIC)
  17. endif (NOT WINDOWS)
  18. set(media_plugin_cef_SOURCE_FILES
  19. media_plugin_cef.cpp
  20. )
  21. add_library(media_plugin_cef
  22. SHARED
  23. ${media_plugin_cef_SOURCE_FILES}
  24. )
  25. if (DARWIN)
  26. # Do not prepend 'lib' to the executable name, and do not embed a full
  27. # install path (which would wrongly be the sources path) inside the library.
  28. set_target_properties(media_plugin_cef
  29. PROPERTIES
  30. PREFIX ""
  31. BUILD_WITH_INSTALL_NAME_DIR 1
  32. BUILD_WITH_INSTALL_RPATH 1
  33. INSTALL_NAME_DIR "@executable_path"
  34. LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
  35. )
  36. endif (DARWIN)
  37. if (LINUX)
  38. # Do not prepend 'lib' to the executable name
  39. set_target_properties(media_plugin_cef
  40. PROPERTIES
  41. PREFIX ""
  42. )
  43. endif (LINUX)
  44. if (WINDOWS)
  45. set_target_properties(media_plugin_cef
  46. PROPERTIES
  47. LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT"
  48. LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD"
  49. )
  50. endif (WINDOWS)
  51. target_link_libraries(media_plugin_cef
  52. ${LLPLUGIN_LIBRARIES}
  53. ${MEDIA_PLUGIN_BASE_LIBRARIES}
  54. ${CEF_PLUGIN_LIBRARIES}
  55. ${LLCOMMON_LIBRARIES}
  56. ${LLFILESYSTEM_LIBRARIES}
  57. ${PLUGIN_API_LIBRARIES}
  58. )
  59. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  60. message("media_plugins/cef COMPILE_DEFINITIONS = ${ALLDEFINES}")