CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # -*- cmake -*-
  2. project(llprimitive)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLCharacter)
  6. include(LLMath)
  7. include(LLMessage)
  8. include(LLPrimitive)
  9. include(LLXML)
  10. include(ZLIB)
  11. set(llprimitive_SOURCE_FILES
  12. imageids.cpp
  13. lldaeloader.cpp
  14. llgltfloader.cpp
  15. llgltfmaterial.cpp
  16. llmaterial.cpp
  17. llmaterialid.cpp
  18. llmaterialtable.cpp
  19. llmediaentry.cpp
  20. llmeshoptimizer.cpp
  21. llmodel.cpp
  22. llmodelloader.cpp
  23. llphysshapebuilderutil.cpp
  24. llprimitive.cpp
  25. llprimtexturelist.cpp
  26. lltextureanim.cpp
  27. lltextureentry.cpp
  28. lltreeparams.cpp
  29. llvolume.cpp
  30. llvolumemessage.cpp
  31. llvolumemgr.cpp
  32. llvolumeoctree.cpp
  33. llxform.cpp
  34. sound_ids.cpp
  35. )
  36. set(llprimitive_HEADER_FILES
  37. CMakeLists.txt
  38. imageids.h
  39. lldaeloader.h
  40. llgltfloader.h
  41. llgltfmaterial.h
  42. lllslconstants.h
  43. llmaterial.h
  44. llmaterialid.h
  45. llmaterialtable.h
  46. llmediaentry.h
  47. llmeshoptimizer.h
  48. llmodel.h
  49. llmodelloader.h
  50. lloctree.h
  51. llphysshapebuilderutil.h
  52. llprimitive.h
  53. llprimtexturelist.h
  54. lltextureanim.h
  55. lltextureentry.h
  56. lltreeparams.h
  57. lltree_common.h
  58. llvolume.h
  59. llvolumemessage.h
  60. llvolumemgr.h
  61. llvolumeoctree.h
  62. llxform.h
  63. object_flags.h
  64. sound_ids.h
  65. )
  66. set_source_files_properties(${llprimitive_HEADER_FILES}
  67. PROPERTIES HEADER_FILE_ONLY TRUE)
  68. list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES})
  69. add_library (llprimitive ${llprimitive_SOURCE_FILES})
  70. add_dependencies(llprimitive prepare)
  71. target_link_libraries(llprimitive
  72. meshoptimizer
  73. ${LLCOMMON_LIBRARIES}
  74. ${LLMATH_LIBRARIES}
  75. ${LLMESSAGE_LIBRARIES}
  76. ${LLXML_LIBRARIES}
  77. ${LLCHARACTER_LIBRARIES}
  78. ${ZLIB_LIBRARIES}
  79. )
  80. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  81. target_precompile_headers(llprimitive PRIVATE <linden_common.h>)
  82. if (USEUNITYBUILD)
  83. set_target_properties(llprimitive PROPERTIES UNITY_BUILD ON)
  84. endif (USEUNITYBUILD)
  85. endif ()
  86. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  87. message("llprimitive COMPILE_DEFINITIONS = ${ALLDEFINES}")