CMakeLists.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # -*- cmake -*-
  2. project(llcommon)
  3. include(00-Common)
  4. include(APR)
  5. include(Boost)
  6. include(EXPAT)
  7. include(LLCommon)
  8. include(Linking)
  9. include(Tracy)
  10. include(Json)
  11. include(xxHash)
  12. include(ZLIB)
  13. set(llcommon_SOURCE_FILES
  14. indra_constants.cpp
  15. llapp.cpp
  16. llapr.cpp
  17. llassettype.cpp
  18. llbase64.cpp
  19. llbitpack.cpp
  20. llcallbacklist.cpp
  21. llcommandlineparser.cpp
  22. llcommon.cpp
  23. llcoros.cpp
  24. llcrc.cpp
  25. llcriticaldamp.cpp
  26. lldate.cpp
  27. lldependencies.cpp
  28. lldictionary.cpp
  29. llerror.cpp
  30. llevent.cpp
  31. lleventcoro.cpp
  32. lleventdispatcher.cpp
  33. llevents.cpp
  34. lleventtimer.cpp
  35. llfasttimer.cpp
  36. llfile.cpp
  37. llframetimer.cpp
  38. lllivefile.cpp
  39. llmd5.cpp
  40. llmemory.cpp
  41. llmortician.cpp
  42. llmutex.cpp
  43. llpointer.cpp
  44. llprocesslauncher.cpp
  45. llqueuedthread.cpp
  46. llrand.cpp
  47. llrefcount.cpp
  48. llsafehandle.cpp
  49. llsd.cpp
  50. llsdjson.cpp
  51. llsdserialize.cpp
  52. llsdutil.cpp
  53. llsingleton.cpp
  54. llstat.cpp
  55. llstreamtools.cpp
  56. llstring.cpp
  57. llstringtable.cpp
  58. llsys.cpp
  59. llthread.cpp
  60. llthreadpool.cpp
  61. lltimer.cpp
  62. hbtracy.cpp
  63. lluri.cpp
  64. lluuid.cpp
  65. llworkerthread.cpp
  66. llworkqueue.cpp
  67. llxorcipher.cpp
  68. hbxxh.cpp
  69. )
  70. set(llcommon_HEADER_FILES
  71. CMakeLists.txt
  72. indra_constants.h
  73. linden_common.h
  74. llalignedarray.h
  75. llapp.h
  76. llapr.h
  77. llassettype.h
  78. llatomic.h
  79. llbase64.h
  80. llbitpack.h
  81. llcallbacklist.h
  82. llcommandlineparser.h
  83. llcommon.h
  84. llcommonmath.h
  85. llcoros.h
  86. llcrc.h
  87. llcriticaldamp.h
  88. lldate.h
  89. lldependencies.h
  90. lldictionary.h
  91. llendianswizzle.h
  92. llerror.h
  93. llerrorcontrol.h
  94. llevent.h
  95. lleventcoro.h
  96. lleventdispatcher.h
  97. llevents.h
  98. lleventtimer.h
  99. hbfastmap.h
  100. hbfastset.h
  101. llfasttimer.h
  102. llfile.h
  103. llframetimer.h
  104. llhandle.h
  105. llinitdestroyclass.h
  106. llinstancetracker.h
  107. hbintrinsics.h
  108. lllivefile.h
  109. llmd5.h
  110. llmemory.h
  111. llmemorystream.h
  112. llmortician.h
  113. llmutex.h
  114. llpointer.h
  115. llpreprocessor.h
  116. llprocesslauncher.h
  117. llqueuedthread.h
  118. llrand.h
  119. llrefcount.h
  120. llsafehandle.h
  121. llsd.h
  122. llsdjson.h
  123. llsdserialize.h
  124. llsdutil.h
  125. llsingleton.h
  126. llstat.h
  127. llstl.h
  128. llstreamtools.h
  129. llstrider.h
  130. llstring.h
  131. llstringtable.h
  132. llsys.h
  133. llthread.h
  134. llthreadpool.h
  135. llthreadsafequeue.h
  136. lltimer.h
  137. hbtracy.h
  138. lluri.h
  139. lluuid.h
  140. llversionviewer.h
  141. llwin32headers.h
  142. llwin32headerslean.h
  143. llworkerthread.h
  144. llworkqueue.h
  145. llxorcipher.h
  146. hbxxh.h
  147. stdtypes.h
  148. )
  149. # Currently, in the Cool VL Viewer, LLLeap is only used by the Puppetry code
  150. # and this project has been withdrawn by LL. LLLeap is therefore only built
  151. # when puppetry is itself enabled at build time, which is not the case any more
  152. # by default... HB
  153. if (ENABLE_PUPPETRY)
  154. list(APPEND llcommon_SOURCE_FILES llleap.cpp)
  155. list(APPEND llcommon_HEADER_FILES llleap.h)
  156. endif (ENABLE_PUPPETRY)
  157. set_source_files_properties(${llcommon_HEADER_FILES}
  158. PROPERTIES HEADER_FILE_ONLY TRUE)
  159. list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
  160. if (NOT WINDOWS)
  161. add_definitions(-fPIC)
  162. endif (NOT WINDOWS)
  163. add_library(llcommon ${llcommon_SOURCE_FILES})
  164. add_dependencies(llcommon prepare)
  165. target_link_libraries(llcommon
  166. ${WINDOWS_LIBRARIES}
  167. ${APR_LIBRARIES}
  168. ${EXPAT_LIBRARIES}
  169. ${JSONCPP_LIBRARIES}
  170. ${ZLIB_LIBRARIES}
  171. ${TRACY_LIBRARY}
  172. ${BOOST_FIBER_LIBRARY}
  173. ${BOOST_CONTEXT_LIBRARY}
  174. ${BOOST_PROGRAM_OPTIONS_LIBRARY}
  175. ${BOOST_THREAD_LIBRARY}
  176. ${BOOST_CHRONO_LIBRARY}
  177. ${BOOST_SYSTEM_LIBRARY}
  178. ${BOOST_ATOMIC_LIBRARY}
  179. )
  180. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  181. target_precompile_headers(llcommon PRIVATE linden_common.h hbfastmap.h)
  182. if (USEUNITYBUILD)
  183. set_target_properties(llcommon PROPERTIES UNITY_BUILD ON)
  184. # Exclude this one because of old events and new events ambiguity...
  185. set_property(SOURCE llevent.cpp PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
  186. endif (USEUNITYBUILD)
  187. endif ()
  188. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  189. message("llcommon COMPILE_DEFINITIONS = ${ALLDEFINES}")