From baab17e6547c9ce11ec42a09c119aef90e840eea Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 3 Aug 2021 05:41:58 -0400
Subject: [PATCH] More linking fixes

---
 indra/cmake/00-Common.cmake        | 2 +-
 indra/cmake/LLFileSystem.cmake     | 4 +++-
 indra/llfilesystem/CMakeLists.txt  | 7 ++++---
 indra/llfilesystem/lldiskcache.cpp | 2 +-
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 3a5136c2519..e53b067510e 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -142,7 +142,7 @@ if (WINDOWS)
   endif()
 
   set(GLOBAL_CXX_FLAGS 
-      "/GS /W3 /c /Zc:__cplusplus  /Zc:forScope /Zc:rvalueCast /Zc:strictStrings /Zc:ternary /nologo"
+      "/GS /W3 /c /Zc:__cplusplus /Zc:forScope /Zc:rvalueCast /Zc:strictStrings /Zc:ternary /nologo"
       )
 
   if (USE_AVX2)
diff --git a/indra/cmake/LLFileSystem.cmake b/indra/cmake/LLFileSystem.cmake
index 2e6c42c30c2..72bd42ebfdc 100644
--- a/indra/cmake/LLFileSystem.cmake
+++ b/indra/cmake/LLFileSystem.cmake
@@ -1,7 +1,9 @@
 # -*- cmake -*-
+include(Abseil)
+include(Boost)
 
 set(LLFILESYSTEM_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llfilesystem
     )
 
-set(LLFILESYSTEM_LIBRARIES llfilesystem)
+set(LLFILESYSTEM_LIBRARIES llfilesystem ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SYSTEM_LIBRARY} absl::strings)
diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt
index ac86f59c107..3c8f6b3d6ea 100644
--- a/indra/llfilesystem/CMakeLists.txt
+++ b/indra/llfilesystem/CMakeLists.txt
@@ -70,19 +70,20 @@ set(cache_BOOST_LIBRARIES
     )
 
 target_link_libraries(llfilesystem
+    PUBLIC
     ${LLCOMMON_LIBRARIES}
     ${cache_BOOST_LIBRARIES}
     absl::strings
     )
 
 if (WINDOWS)
-  target_link_libraries(llfilesystem Shlwapi)
+  target_link_libraries(llfilesystem PUBLIC Shlwapi)
 endif (WINDOWS)
 
 if (DARWIN)
   include(CMakeFindFrameworks)
   find_library(COCOA_LIBRARY Cocoa)
-  target_link_libraries(llfilesystem ${COCOA_LIBRARY})
+  target_link_libraries(llfilesystem PUBLIC ${COCOA_LIBRARY})
 endif (DARWIN)
 
 if(${CMAKE_VERSION} VERSION_GREATER "3.15.0") 
@@ -107,7 +108,7 @@ if (LL_TESTS)
     LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}")
 
     # INTEGRATION TESTS
-    set(test_libs llmath llcommon llfilesystem ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+    set(test_libs llmath llcommon llfilesystem ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} absl::strings)
 
     # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
     LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index 3166a515481..dcf23ef9b83 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -211,7 +211,7 @@ const std::string LLDiskCache::metaDataToFilepath(const LLUUID& id,
 {
     std::string uuidstr = id.asString();
     const auto& dirdelim = gDirUtilp->getDirDelimiter();
-    return absl::StrCat(sCacheDir, dirdelim, absl::string_view(&uuidstr[0], 1), dirdelim, uuidstr, sCacheFilenameExt);
+    return absl::StrCat(sCacheDir, dirdelim, std::string_view(&uuidstr[0], 1), dirdelim, uuidstr, sCacheFilenameExt);
 }
 
 const std::string LLDiskCache::getCacheInfo()
-- 
GitLab