CMakeLists.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # -*- cmake -*-
  2. project(llrender)
  3. include(00-Common)
  4. include(FreeType)
  5. include(LLCommon)
  6. include(LLFilesystem)
  7. include(LLImage)
  8. include(LLMath)
  9. include(LLRender)
  10. include(LLWindow)
  11. include(LLXML)
  12. set(llrender_SOURCE_FILES
  13. llcubemap.cpp
  14. llcubemaparray.cpp
  15. llfontbitmapcache.cpp
  16. llfontfreetype.cpp
  17. llfontgl.cpp
  18. llfontregistry.cpp
  19. llgl.cpp
  20. llglslshader.cpp
  21. llgltexture.cpp
  22. llimagegl.cpp
  23. llrender.cpp
  24. llrendertarget.cpp
  25. llrenderutils.cpp
  26. llshadermgr.cpp
  27. llvertexbuffer.cpp
  28. )
  29. set(llrender_HEADER_FILES
  30. CMakeLists.txt
  31. llcubemap.h
  32. llcubemaparray.h
  33. llfontgl.h
  34. llfontfreetype.h
  35. llfontbitmapcache.h
  36. llfontregistry.h
  37. llgl.h
  38. llglheaders.h
  39. llglslshader.h
  40. llgltexture.h
  41. llimagegl.h
  42. llrender.h
  43. llrendertarget.h
  44. llrenderutils.h
  45. llshadermgr.h
  46. llvertexbuffer.h
  47. )
  48. set_source_files_properties(${llrender_HEADER_FILES}
  49. PROPERTIES HEADER_FILE_ONLY TRUE)
  50. list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES})
  51. add_library (llrender ${llrender_SOURCE_FILES})
  52. add_dependencies(llrender prepare)
  53. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  54. target_precompile_headers(llrender PRIVATE <linden_common.h> <hbfastmap.h>)
  55. if (USEUNITYBUILD)
  56. set_target_properties(llrender PROPERTIES UNITY_BUILD ON)
  57. # Needed to avoid failure by cmake to properly include the glh_extensions.h
  58. # header, resulting in bogus "undeclared identifier gGLHExts" error...
  59. set_property(SOURCE llgl.cpp PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
  60. endif (USEUNITYBUILD)
  61. endif ()
  62. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  63. message("llrender COMPILE_DEFINITIONS = ${ALLDEFINES}")