From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 16:32:52 +0200 Subject: Move CMake files to modernized cmake syntax, step 1. Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects. --- indra/llprimitive/CMakeLists.txt | 42 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 30 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7b6d04b096..fb81f19206 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -4,27 +4,9 @@ project(llprimitive) include(00-Common) include(LLCommon) -include(LLMath) -include(LLMessage) include(LLCoreHttp) -include(LLXML) include(LLPhysicsExtensions) -include(LLCharacter) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada - ${LIBS_PREBUILT_DIR}/include/collada/1.4 - ${LLCHARACTER_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} - ) +include(LLPrimitive) set(llprimitive_SOURCE_FILES lldaeloader.cpp @@ -71,19 +53,19 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) +set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLPHYSICSEXTENSIONS_LIBRARIES} - ${LLCHARACTER_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ) - + llcommon + llmath + llmessage + llcorehttp + llxml + llcharacter + llphysicsextensions + colladadom::colladadom + pcre::pcre + ) #add unit tests if (LL_TESTS) -- cgit v1.2.3 From 241919e7f7986c11586a49bff53cf19c2c0e0ea6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 19:21:55 +0200 Subject: Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard(). --- indra/llprimitive/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index fb81f19206..79b54c9df8 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,8 +63,8 @@ target_link_libraries(llprimitive llxml llcharacter llphysicsextensions - colladadom::colladadom - pcre::pcre + ll::colladadom + ll::pcre ) #add unit tests -- cgit v1.2.3 From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:04:57 +0200 Subject: Switch to target_include_directories All 3Ps include dirs are treated as SYSTEM, this will stop compilers stop emitting warnings from those files and greatly helps having high warning levels and not being swamped by warnings that come from external libraries. --- indra/llprimitive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 79b54c9df8..d69b24a07f 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -53,7 +53,7 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) -set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llprimitive INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive llcommon -- 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/llprimitive/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index d69b24a07f..698d523dd3 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -7,6 +7,7 @@ include(LLCommon) include(LLCoreHttp) include(LLPhysicsExtensions) include(LLPrimitive) +include(GLH) set(llprimitive_SOURCE_FILES lldaeloader.cpp @@ -65,6 +66,7 @@ target_link_libraries(llprimitive llphysicsextensions ll::colladadom ll::pcre + ll::glh_linear ) #add unit tests -- cgit v1.2.3 From 283c2a20cc4ef856076d287303c7143332b201fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 00:38:40 +0200 Subject: Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically sets the property on those. --- indra/llprimitive/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 698d523dd3..bf35500bad 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -47,9 +47,6 @@ set(llprimitive_HEADER_FILES material_codes.h object_flags.h ) - -set_source_files_properties(${llprimitive_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) -- cgit v1.2.3 From 65612700f389d453d4817fb3f68429a60ea144b8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 24 Aug 2022 14:00:16 -0400 Subject: DRTVWR-558: Eliminate many spurious set-not-used variables. With Xcode 13.4, these unused variables break Release builds. --- indra/llprimitive/llmodel.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 285c5f656b..4b505a79c4 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -889,7 +889,6 @@ LLSD LLModel::writeModel( LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BOOL as_slm) { - U32 bytes = 0; std::string::size_type cur_offset = 0; @@ -912,7 +911,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header["skin"]["offset"] = (LLSD::Integer) cur_offset; header["skin"]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } @@ -928,7 +926,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header["physics_convex"]["offset"] = (LLSD::Integer) cur_offset; header["physics_convex"]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } @@ -950,7 +947,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header[model_names[i]]["offset"] = (LLSD::Integer) cur_offset; header[model_names[i]]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } -- cgit v1.2.3 From 68c680599b3ee038a33bcad36ac52912725cf3cd Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 11:21:06 +0200 Subject: Try to make sure this also works with the havok version of llphysicsextension. --- indra/llprimitive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index bf35500bad..7d83dc77c1 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -60,7 +60,7 @@ target_link_libraries(llprimitive llcorehttp llxml llcharacter - llphysicsextensions + llphysicsextensions_impl ll::colladadom ll::pcre ll::glh_linear -- 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/llprimitive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7d83dc77c1..d69cd958a0 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,7 +63,7 @@ target_link_libraries(llprimitive llphysicsextensions_impl ll::colladadom ll::pcre - ll::glh_linear + ll::glh_linear ) #add unit tests -- cgit v1.2.3