CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # -*- cmake -*-
  2. project(media_plugin_base)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLImage)
  6. include(LLPlugin)
  7. include(LLMath)
  8. include(LLRender)
  9. include(LLWindow)
  10. include(Linking)
  11. include(FindOpenGL)
  12. ### media_plugin_base
  13. if (NOT WINDOWS)
  14. add_definitions(-fPIC)
  15. endif (NOT WINDOWS)
  16. set(media_plugin_base_SOURCE_FILES
  17. media_plugin_base.cpp
  18. )
  19. set(media_plugin_base_HEADER_FILES
  20. CMakeLists.txt
  21. media_plugin_base.h
  22. volume_catcher.h
  23. )
  24. # Select which VolumeCatcher implementation to use
  25. if (LINUX)
  26. if (PULSEAUDIO_FOUND)
  27. list(APPEND media_plugin_base_SOURCE_FILES linux_volume_catcher.cpp)
  28. else (PULSEAUDIO_FOUND)
  29. list(APPEND media_plugin_base_SOURCE_FILES dummy_volume_catcher.cpp)
  30. endif (PULSEAUDIO_FOUND)
  31. list(APPEND media_plugin_base_LINK_LIBRARIES
  32. ${UI_LIBRARIES} # for glib
  33. )
  34. elseif (DARWIN)
  35. # No QuickTime SDK available for 64 bits Darwin builds...
  36. list(APPEND media_plugin_base_SOURCE_FILES dummy_volume_catcher.cpp)
  37. elseif (WINDOWS)
  38. list(APPEND media_plugin_base_SOURCE_FILES windows_volume_catcher.cpp)
  39. endif (LINUX)
  40. add_library(media_plugin_base
  41. ${media_plugin_base_SOURCE_FILES}
  42. )
  43. if (DARWIN)
  44. find_library(CORESERVICES_LIBRARY CoreServices)
  45. find_library(AUDIOUNIT_LIBRARY AudioUnit)
  46. target_link_libraries(media_plugin_base
  47. ${CORESERVICES_LIBRARY} # for Component Manager calls
  48. ${AUDIOUNIT_LIBRARY} # for AudioUnit calls
  49. )
  50. endif (DARWIN)
  51. add_dependencies(media_plugin_base
  52. prepare
  53. )
  54. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  55. message("media_plugins/base COMPILE_DEFINITIONS = ${ALLDEFINES}")