PageRenderTime 37ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 134 lines | 90 code | 21 blank | 23 comment | 15 complexity | afd685cf284abcead2f9dd9daaa42837 MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. # cmake_minimum_required should appear before any
  3. # other commands to guarantee full compatibility
  4. # with the version specified
  5. # The "cmake -E touch" command was released with 2.4.8.
  6. cmake_minimum_required(VERSION 2.4.8 FATAL_ERROR)
  7. # This makes cmake 2.6 not complain about version 2.4 compatibility.
  8. if (COMMAND cmake_policy)
  9. cmake_policy(SET CMP0003 OLD)
  10. endif (COMMAND cmake_policy)
  11. set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
  12. "The root project/makefile/solution name. Defaults to SecondLife.")
  13. project(${ROOT_PROJECT_NAME})
  14. set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
  15. include(Variables)
  16. if (DARWIN)
  17. # 2.6.4 fixes a Mac bug in get_target_property(... "SLPlugin" LOCATION):
  18. # before that version it returns "pathname/SLPlugin", whereas the correct
  19. # answer is "pathname/SLPlugin.app/Contents/MacOS/SLPlugin".
  20. cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
  21. endif (DARWIN)
  22. if (NOT CMAKE_BUILD_TYPE)
  23. set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
  24. "Build type. One of: Debug Release RelWithDebInfo" FORCE)
  25. endif (NOT CMAKE_BUILD_TYPE)
  26. # For the library installation process;
  27. # see cmake/Prebuild.cmake for the counterpart code.
  28. if ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${CMAKE_BINARY_DIR}/temp/sentinel_installed")
  29. file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/temp)
  30. file(WRITE ${CMAKE_BINARY_DIR}/temp/sentinel_installed "0")
  31. endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${CMAKE_BINARY_DIR}/temp/sentinel_installed")
  32. add_subdirectory(cmake)
  33. add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
  34. add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter)
  35. add_subdirectory(${LIBS_OPEN_PREFIX}llcommon)
  36. add_subdirectory(${LIBS_OPEN_PREFIX}llimage)
  37. add_subdirectory(${LIBS_OPEN_PREFIX}llkdu)
  38. add_subdirectory(${LIBS_OPEN_PREFIX}llimagej2coj)
  39. add_subdirectory(${LIBS_OPEN_PREFIX}llinventory)
  40. add_subdirectory(${LIBS_OPEN_PREFIX}llmath)
  41. add_subdirectory(${LIBS_OPEN_PREFIX}llmessage)
  42. add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive)
  43. add_subdirectory(${LIBS_OPEN_PREFIX}llrender)
  44. add_subdirectory(${LIBS_OPEN_PREFIX}llvfs)
  45. add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
  46. add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
  47. add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
  48. if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
  49. add_subdirectory(${LIBS_CLOSED_PREFIX}copy_win_scripts)
  50. endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
  51. add_custom_target(viewer)
  52. if (VIEWER)
  53. add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
  54. add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
  55. add_subdirectory(${LIBS_OPEN_PREFIX}llui)
  56. add_subdirectory(${LIBS_OPEN_PREFIX}llxuixml)
  57. add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
  58. # Legacy C++ tests. Build always, run if LL_TESTS is true.
  59. add_subdirectory(${VIEWER_PREFIX}test)
  60. # viewer media plugins
  61. add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
  62. # llplugin testbed code (is this the right way to include it?)
  63. if (LL_TESTS AND NOT LINUX)
  64. add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
  65. endif (LL_TESTS AND NOT LINUX)
  66. if (LINUX)
  67. add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
  68. add_subdirectory(${VIEWER_PREFIX}linux_updater)
  69. add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
  70. elseif (DARWIN)
  71. add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
  72. add_subdirectory(${VIEWER_PREFIX}mac_updater)
  73. add_dependencies(viewer mac-updater mac-crash-logger)
  74. elseif (WINDOWS)
  75. add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
  76. # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
  77. if (EXISTS ${VIEWER_DIR}win_setup)
  78. add_subdirectory(${VIEWER_DIR}win_setup)
  79. endif (EXISTS ${VIEWER_DIR}win_setup)
  80. add_subdirectory(${VIEWER_PREFIX}win_updater)
  81. # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
  82. add_dependencies(viewer windows-updater windows-crash-logger)
  83. elseif (SOLARIS)
  84. add_subdirectory(solaris_crash_logger)
  85. add_dependencies(viewer solaris-crash-logger)
  86. endif (LINUX)
  87. add_subdirectory(${VIEWER_PREFIX}newview)
  88. add_dependencies(viewer secondlife-bin)
  89. endif (VIEWER)
  90. # Linux builds the viewer and server in 2 separate projects
  91. # In order for build server to work on linux,
  92. # the viewer project needs a server target.
  93. # This is not true for mac and windows.
  94. if (LINUX)
  95. add_custom_target(server)
  96. endif (LINUX)
  97. if (SERVER)
  98. if (NOT LINUX)
  99. add_custom_target(server)
  100. endif (NOT LINUX)
  101. include(${SERVER_PREFIX}Server.cmake)
  102. endif (SERVER)
  103. # Windows builds include tools like VFS tool
  104. if (SERVER)
  105. if (WINDOWS)
  106. add_subdirectory(${SERVER_PREFIX}tools)
  107. endif (WINDOWS)
  108. endif (SERVER)
  109. if (LL_TESTS)
  110. # Define after the custom viewer and server targets are created so
  111. # individual apps can add themselves as dependencies
  112. add_subdirectory(${INTEGRATION_TESTS_PREFIX}integration_tests)
  113. endif (LL_TESTS)