CMakeLists.txt
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:4k
源码类别:

游戏引擎

开发平台:

C++ Builder

  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.   cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
  18. endif (DARWIN)
  19. if (NOT CMAKE_BUILD_TYPE)
  20.   set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
  21.       "Build type.  One of: Debug Release RelWithDebInfo" FORCE)
  22. endif (NOT CMAKE_BUILD_TYPE)
  23. # For the library installation process;
  24. # see cmake/Prebuild.cmake for the counterpart code.
  25. file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/temp)
  26. file(WRITE ${CMAKE_BINARY_DIR}/temp/sentinel_installed "0")
  27. add_subdirectory(cmake)
  28. add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
  29. add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter)
  30. add_subdirectory(${LIBS_OPEN_PREFIX}llcommon)
  31. add_subdirectory(${LIBS_OPEN_PREFIX}llimage)
  32. add_subdirectory(${LIBS_OPEN_PREFIX}llimagej2coj)
  33. add_subdirectory(${LIBS_OPEN_PREFIX}llinventory)
  34. add_subdirectory(${LIBS_OPEN_PREFIX}llmath)
  35. add_subdirectory(${LIBS_OPEN_PREFIX}llmessage)
  36. add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive)
  37. add_subdirectory(${LIBS_OPEN_PREFIX}llrender)
  38. add_subdirectory(${LIBS_OPEN_PREFIX}llvfs)
  39. add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
  40. add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
  41. if (EXISTS ${LIBS_CLOSED_DIR}llkdu)
  42.   add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu)
  43. endif (EXISTS ${LIBS_CLOSED_DIR}llkdu)
  44. add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
  45. if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
  46.   add_subdirectory(${LIBS_CLOSED_PREFIX}copy_win_scripts)
  47. endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
  48. add_custom_target(viewer)
  49. if (VIEWER)
  50.   add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
  51.   add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
  52.   add_subdirectory(${LIBS_OPEN_PREFIX}llui)
  53.   add_subdirectory(${LIBS_OPEN_PREFIX}llxuixml)
  54.   add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
  55.   # viewer media plugins
  56.   add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
  57.   # llplugin testbed code (is this the right way to include it?)
  58.   if (NOT LINUX)
  59.     add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
  60.   endif (NOT LINUX)
  61.   if (LINUX)
  62.     add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
  63.     add_subdirectory(${VIEWER_PREFIX}linux_updater)
  64.     add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
  65.   elseif (DARWIN)
  66.     add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
  67.     add_subdirectory(${VIEWER_PREFIX}mac_updater)
  68.     add_dependencies(viewer mac-updater mac-crash-logger)
  69.   elseif (WINDOWS)
  70.     add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
  71.     # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
  72.     if (EXISTS ${VIEWER_DIR}win_setup)
  73.       add_subdirectory(${VIEWER_DIR}win_setup)
  74.     endif (EXISTS ${VIEWER_DIR}win_setup)
  75.     add_subdirectory(${VIEWER_PREFIX}win_updater)
  76.     # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
  77.     add_dependencies(viewer windows-updater windows-crash-logger)
  78.   elseif (SOLARIS)
  79.     add_subdirectory(solaris_crash_logger)
  80.     add_dependencies(viewer solaris-crash-logger)
  81.   endif (LINUX)
  82.   add_subdirectory(${VIEWER_PREFIX}newview)
  83.   add_dependencies(viewer secondlife-bin)
  84. endif (VIEWER)
  85. # Linux builds the viewer and server in 2 separate projects
  86. # In order for ./develop.py build server to work on linux, 
  87. # the viewer project needs a server target.
  88. # This is not true for mac and windows.
  89. if (LINUX) 
  90.   add_custom_target(server)
  91. endif (LINUX)
  92. if (SERVER)
  93.   if (NOT LINUX)
  94.     add_custom_target(server)
  95.   endif (NOT LINUX)
  96.   include(${SERVER_PREFIX}Server.cmake)
  97. endif (SERVER)
  98. # Windows builds include tools like VFS tool
  99. if (SERVER)
  100.   if (WINDOWS)
  101.     add_subdirectory(${SERVER_PREFIX}tools)
  102.   endif (WINDOWS)
  103. endif (SERVER)
  104. # Define after the custom viewer and server targets are created so individual
  105. # apps can add themselves as dependencies
  106. add_subdirectory(${INTEGRATION_TESTS_PREFIX}integration_tests)