diff options
Diffstat (limited to 'indra/CMakeLists.txt')
-rwxr-xr-x | indra/CMakeLists.txt | 85 |
1 files changed, 36 insertions, 49 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index e06c928eb5..bdbfc55fa2 100755 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -3,14 +3,8 @@ # cmake_minimum_required should appear before any # other commands to guarantee full compatibility # with the version specified - -# The "cmake -E touch" command was released with 2.4.8. -cmake_minimum_required(VERSION 2.4.8 FATAL_ERROR) - -# This makes cmake 2.6 not complain about version 2.4 compatibility. -if (COMMAND cmake_policy) - cmake_policy(SET CMP0003 OLD) -endif (COMMAND cmake_policy) +## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly +cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") @@ -19,13 +13,7 @@ project(${ROOT_PROJECT_NAME}) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(Variables) - -if (DARWIN) - # 2.6.4 fixes a Mac bug in get_target_property(... "SLPlugin" LOCATION): - # before that version it returns "pathname/SLPlugin", whereas the correct - # answer is "pathname/SLPlugin.app/Contents/MacOS/SLPlugin". - cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) -endif (DARWIN) +include(BuildVersion) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING @@ -64,50 +52,49 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) add_custom_target(viewer) - add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger) - add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) - add_subdirectory(${LIBS_OPEN_PREFIX}llui) - add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) +add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger) +add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) +add_subdirectory(${LIBS_OPEN_PREFIX}llui) +add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) - # Legacy C++ tests. Build always, run if LL_TESTS is true. - add_subdirectory(${VIEWER_PREFIX}test) +# Legacy C++ tests. Build always, run if LL_TESTS is true. +add_subdirectory(${VIEWER_PREFIX}test) - # viewer media plugins - add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins) +# viewer media plugins +add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins) - # llplugin testbed code (is this the right way to include it?) - if (LL_TESTS AND NOT LINUX) - add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest) - endif (LL_TESTS AND NOT LINUX) +# llplugin testbed code (is this the right way to include it?) +if (LL_TESTS AND NOT LINUX) + add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest) +endif (LL_TESTS AND NOT LINUX) - if (LINUX) - add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) +if (LINUX) + add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) add_subdirectory(${VIEWER_PREFIX}linux_updater) if (INSTALL_PROPRIETARY) include(LLAppearanceUtility) add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR}) endif (INSTALL_PROPRIETARY) add_dependencies(viewer linux-crash-logger-strip-target linux-updater) - elseif (DARWIN) - add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) - add_subdirectory(${VIEWER_PREFIX}mac_updater) - add_dependencies(viewer mac-updater mac-crash-logger) - elseif (WINDOWS) - add_subdirectory(${VIEWER_PREFIX}win_crash_logger) - # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake - if (EXISTS ${VIEWER_DIR}win_setup) - add_subdirectory(${VIEWER_DIR}win_setup) - endif (EXISTS ${VIEWER_DIR}win_setup) - add_subdirectory(${VIEWER_PREFIX}win_updater) - # add_dependencies(viewer windows-updater windows-setup windows-crash-logger) - add_dependencies(viewer windows-updater windows-crash-logger) - elseif (SOLARIS) - add_subdirectory(solaris_crash_logger) - add_dependencies(viewer solaris-crash-logger) - endif (LINUX) - - add_subdirectory(${VIEWER_PREFIX}newview) - add_dependencies(viewer secondlife-bin) +elseif (DARWIN) + add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) + add_dependencies(viewer mac-crash-logger) +elseif (WINDOWS) + add_subdirectory(${VIEWER_PREFIX}win_crash_logger) + # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake + if (EXISTS ${VIEWER_DIR}win_setup) + add_subdirectory(${VIEWER_DIR}win_setup) + endif (EXISTS ${VIEWER_DIR}win_setup) + add_subdirectory(${VIEWER_PREFIX}win_updater) + # add_dependencies(viewer windows-updater windows-setup windows-crash-logger) + add_dependencies(viewer windows-updater windows-crash-logger) +elseif (SOLARIS) + add_subdirectory(solaris_crash_logger) + add_dependencies(viewer solaris-crash-logger) +endif (LINUX) + +add_subdirectory(${VIEWER_PREFIX}newview) +add_dependencies(viewer secondlife-bin) if (LL_TESTS) # Define after the custom targets are created so |