diff options
Diffstat (limited to 'indra/CMakeLists.txt')
-rw-r--r-- | indra/CMakeLists.txt | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 1ab5888914..93b9466c24 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -4,21 +4,31 @@ # other commands to guarantee full compatibility # with the version specified ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support -cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) +# 3.13/12 is needed for add_link_options/add_compile_definitions +# 3.16 is needed for target_precompile_headers +cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") project(${ROOT_PROJECT_NAME}) -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}") + + +include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN ) +if( USE_CONAN ) + set( USE_CONAN ON ) + conan_basic_setup(TARGETS NO_OUTPUT_DIRS) + add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN) +else() + set( USE_CONAN OFF ) +endif() + +set(CXX_STANDARD 14) include(Variables) include(BuildVersion) -set(LEGACY_STDIO_LIBS) -if (WINDOWS) - set(LEGACY_STDIO_LIBS legacy_stdio_definitions) -endif (WINDOWS) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING @@ -58,8 +68,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) add_subdirectory(${LIBS_OPEN_PREFIX}llui) add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) +if( LL_TESTS ) # Legacy C++ tests. Build always, run if LL_TESTS is true. add_subdirectory(${VIEWER_PREFIX}test) +endif() if (ENABLE_MEDIA_PLUGINS) # viewer media plugins @@ -71,7 +83,6 @@ if (LINUX) include(LLAppearanceUtility) add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR}) endif (INSTALL_PROPRIETARY) - add_dependencies(viewer linux-crash-logger-strip-target) elseif (WINDOWS) # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake if (EXISTS ${VIEWER_DIR}win_setup) |