/indra/media_plugins/example/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/ · CMake · 82 lines · 65 code · 14 blank · 3 comment · 4 complexity · 9a73be10c34f8531db77256b43d55df4 MD5 · raw file

  1. # -*- cmake -*-
  2. project(media_plugin_example)
  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(PluginAPI)
  12. include(MediaPluginBase)
  13. include(FindOpenGL)
  14. include(ExamplePlugin)
  15. include_directories(
  16. ${LLPLUGIN_INCLUDE_DIRS}
  17. ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
  18. ${LLCOMMON_INCLUDE_DIRS}
  19. ${LLMATH_INCLUDE_DIRS}
  20. ${LLIMAGE_INCLUDE_DIRS}
  21. ${LLRENDER_INCLUDE_DIRS}
  22. ${LLWINDOW_INCLUDE_DIRS}
  23. )
  24. ### media_plugin_example
  25. if(NOT WORD_SIZE EQUAL 32)
  26. if(WINDOWS)
  27. add_definitions(/FIXED:NO)
  28. else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
  29. add_definitions(-fPIC)
  30. endif(WINDOWS)
  31. endif(NOT WORD_SIZE EQUAL 32)
  32. set(media_plugin_example_SOURCE_FILES
  33. media_plugin_example.cpp
  34. )
  35. add_library(media_plugin_example
  36. SHARED
  37. ${media_plugin_example_SOURCE_FILES}
  38. )
  39. target_link_libraries(media_plugin_example
  40. ${LLPLUGIN_LIBRARIES}
  41. ${MEDIA_PLUGIN_BASE_LIBRARIES}
  42. ${LLCOMMON_LIBRARIES}
  43. ${EXAMPLE_PLUGIN_LIBRARIES}
  44. ${PLUGIN_API_WINDOWS_LIBRARIES}
  45. )
  46. add_dependencies(media_plugin_example
  47. ${LLPLUGIN_LIBRARIES}
  48. ${MEDIA_PLUGIN_BASE_LIBRARIES}
  49. ${LLCOMMON_LIBRARIES}
  50. )
  51. if (WINDOWS)
  52. set_target_properties(
  53. media_plugin_example
  54. PROPERTIES
  55. LINK_FLAGS "/MANIFEST:NO"
  56. )
  57. endif (WINDOWS)
  58. if (DARWIN)
  59. # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
  60. set_target_properties(
  61. media_plugin_example
  62. PROPERTIES
  63. PREFIX ""
  64. BUILD_WITH_INSTALL_RPATH 1
  65. INSTALL_NAME_DIR "@executable_path"
  66. LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
  67. )
  68. endif (DARWIN)