CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # -*- cmake -*-
  2. project(llplugin)
  3. include(00-Common)
  4. include(CURL)
  5. include(LLCommon)
  6. include(LLImage)
  7. include(LLMath)
  8. include(LLMessage)
  9. include(LLRender)
  10. include(LLXML)
  11. include(LLWindow)
  12. set(llplugin_SOURCE_FILES
  13. llpluginclassmedia.cpp
  14. llplugininstance.cpp
  15. llpluginmessage.cpp
  16. llpluginmessagepipe.cpp
  17. llpluginprocesschild.cpp
  18. llpluginprocessparent.cpp
  19. llpluginsharedmemory.cpp
  20. )
  21. set(llplugin_HEADER_FILES
  22. CMakeLists.txt
  23. llpluginclassmedia.h
  24. llpluginclassmediaowner.h
  25. llplugininstance.h
  26. llpluginmessage.h
  27. llpluginmessageclasses.h
  28. llpluginmessagepipe.h
  29. llpluginprocesschild.h
  30. llpluginprocessparent.h
  31. llpluginsharedmemory.h
  32. )
  33. set_source_files_properties(${llplugin_HEADER_FILES}
  34. PROPERTIES HEADER_FILE_ONLY TRUE)
  35. if (NOT WINDOWS)
  36. add_definitions(-fPIC)
  37. endif (NOT WINDOWS)
  38. list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
  39. add_library(llplugin ${llplugin_SOURCE_FILES})
  40. add_dependencies(llplugin prepare)
  41. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  42. target_precompile_headers(llplugin PRIVATE <linden_common.h>)
  43. # Disabled since it causes the CEF plugin to crash at startup...
  44. # if (USEUNITYBUILD)
  45. # set_target_properties(llplugin PROPERTIES UNITY_BUILD ON)
  46. # # Exclude this one because of undefined references (resolved at link time)
  47. # set_property(SOURCE llpluginclassmedia.cpp PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
  48. # endif (USEUNITYBUILD)
  49. endif ()
  50. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  51. message("llplugin COMPILE_DEFINITIONS = ${ALLDEFINES}")