CMakeLists.txt 1.4 KB

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