From 6e1ae6ec7b70b7fc20b2593621d79430b97c8325 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 19:03:44 +0200 Subject: Raise the bar to cmake 3.13, this gives access to more modern constructs. --- indra/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 1ab5888914..08599b29e0 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -4,7 +4,8 @@ # 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 +cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") -- cgit v1.2.3 From 0980a943413dadb0d77f36798f1dd5347994da74 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 20:15:07 +0200 Subject: Bump cmake version needed up to 3.16 so target_precompile_headers can be used. --- indra/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 08599b29e0..d06ea58549 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -5,7 +5,8 @@ # with the version specified ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support # 3.13/12 is needed for add_link_options/add_compile_definitions -cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR) +# 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.") -- cgit v1.2.3 From b9f94c08977ff76f41a32a2bb9f25883e578eea3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:33:32 +0200 Subject: Now there is a oslibrary target get rid of some more obsolete vars: LEGACY_STDIO_LIBS (was only used for Windows) PTHREAD_LIBRARY (only Linux) LLDATABASE_LIBRARIES (that one was supposed for Linux, but never needed anyway) --- indra/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index d06ea58549..c4a1ca918f 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -17,10 +17,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") 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 -- cgit v1.2.3 From a9774d34279daf98f1f0fad6e22e32c65280d6a0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:35:13 +0200 Subject: Request C++ standard via standard cmake. --- indra/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index c4a1ca918f..138a4504e4 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -13,6 +13,7 @@ set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING project(${ROOT_PROJECT_NAME}) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +set(CXX_STANDARD 14) include(Variables) include(BuildVersion) -- cgit v1.2.3 From 5aa81b16598044909e51ab8f50663a05f701e127 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:14:49 +0200 Subject: Remove obsolete targets and dependencies. --- indra/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 138a4504e4..40ba284d30 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -70,7 +70,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) -- cgit v1.2.3 From 2b151e0aefd54671e1be504269f10318d303dccb Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 18:11:43 +0200 Subject: Round one to support conan for 3P packages, this allows to build the viewer on Linux again. --- indra/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 40ba284d30..aa0b645a64 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -12,7 +12,15 @@ 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 ) + conan_basic_setup(TARGETS) + add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN) +endif() + set(CXX_STANDARD 14) include(Variables) @@ -57,8 +65,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 -- cgit v1.2.3 From d6b34d41afc1f77a28e60ae1f9e22b61323052fa Mon Sep 17 00:00:00 2001 From: Nicky Date: Tue, 19 Apr 2022 20:28:34 +0200 Subject: Finishing touches, making sure even with conan all needed 3ps are installed and usable. This brings the source to be able to run tests in conan mode. --- indra/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index aa0b645a64..93b9466c24 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -17,8 +17,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}" include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN ) if( USE_CONAN ) - conan_basic_setup(TARGETS) + 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) -- cgit v1.2.3 From 3f31d0b5a70af4ebf746d40d478b4e948e904a87 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Jul 2022 17:51:25 +0200 Subject: Be more explicit: Rename use_conan_binary to use_system_binary, this will allow us to reuse the macro for more than just conan. --- indra/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 4bac78c2ef..541e29bcbf 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -17,11 +17,13 @@ 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) + set( USE_CONAN ON ) + set( USE_AUTOBUILD_3P OFF ) + conan_basic_setup(TARGETS NO_OUTPUT_DIRS) + add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P) else() set( USE_CONAN OFF ) + set( USE_AUTOBUILD_3P ON ) endif() set(CXX_STANDARD 14) -- cgit v1.2.3 From 56d5666f9afe87f2563c6bbb1d220573abd5351e Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Tue, 30 Aug 2022 14:42:40 -0700 Subject: DRTVWR-568 need to update cmake minimum --- indra/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 68f6e962ef..0e7f52d189 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -4,7 +4,8 @@ # 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.14 added FILE CREATE_LINK +cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") -- cgit v1.2.3 From 31341ac605f3f1ae24568af3e09b200daef77b8f Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 16 Sep 2022 23:53:32 +0200 Subject: Settings the startup project must come *after* add_subdirectory(newview). Only after this directory is added the target will be known and can be manipulated. --- indra/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 7e70a44cf2..8386953cdc 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -106,12 +106,6 @@ if (WINDOWS) endif (EXISTS ${VIEWER_DIR}win_setup) endif (WINDOWS) -# sets the 'startup project' for debugging from visual studio. -set_property( - DIRECTORY ${VIEWER_PREFIX} - PROPERTY VS_STARTUP_PROJECT secondlife-bin - ) - if (USE_BUGSPLAT) if (BUGSPLAT_DB) message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'") @@ -127,6 +121,12 @@ add_dependencies(viewer secondlife-bin) add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) +# sets the 'startup project' for debugging from visual studio. +set_property( + DIRECTORY ${VIEWER_PREFIX} + PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME} + ) + if (LL_TESTS) # Define after the custom targets are created so # individual apps can add themselves as dependencies -- cgit v1.2.3 From 7a71cea15bcef59c7085657fba9ae6bdb058cc5b Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 17 Sep 2022 12:02:25 +0200 Subject: Workaround to keep old cmake versions limping around. --- indra/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 8386953cdc..ff6a68ff97 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -7,6 +7,9 @@ ## 3.13/12 is needed for add_link_options/add_compile_definitions ## 3.14 added FILE CREATE_LINK ## 3.16 is needed for target_precompile_headers +## Nicky: Ideally we want at least 3.21 for good preset support +## We're not there yet, but once done, there is a kludge in Linking.cmake +# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING -- cgit v1.2.3 From c7366f4c55c6442414eb6c5a6736baf90f1a4700 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:09:04 +0300 Subject: SL-17238 Fix coding policy build issues --- indra/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/CMakeLists.txt') diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index ff6a68ff97..205ce402a0 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -128,7 +128,7 @@ add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) set_property( DIRECTORY ${VIEWER_PREFIX} PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME} - ) + ) if (LL_TESTS) # Define after the custom targets are created so -- cgit v1.2.3