summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-10-18 19:35:04 +0800
committerErik Kundiman <erik@megapahit.org>2024-10-18 20:23:09 +0800
commit7bde555dde67829e27b26161e3f58bdcc193a024 (patch)
tree3ec6d66bd523415d49642d8f355bd946d17390e8
parentd353111de315f9d37bf914b54a52d217c45a6e19 (diff)
parentceca01eb37ea7c56be87474b6488eecdf0b7c893 (diff)
Merge branch 'main' into 2024.09-ExtraFPS
-rwxr-xr-x.gitignore2
-rw-r--r--README.md43
-rw-r--r--indra/cmake/00-Common.cmake4
-rw-r--r--indra/cmake/Boost.cmake12
-rw-r--r--indra/cmake/CURL.cmake4
-rw-r--r--indra/cmake/LLPrimitive.cmake203
-rw-r--r--indra/cmake/LLWindow.cmake2
-rw-r--r--indra/cmake/Meshoptimizer.cmake99
-rw-r--r--indra/cmake/NDOF.cmake18
-rw-r--r--indra/cmake/OpenJPEG.cmake98
-rw-r--r--indra/cmake/OpenSSL.cmake224
-rw-r--r--indra/cmake/ViewerMiscLibs.cmake8
-rw-r--r--indra/cmake/WebRTC.cmake2
-rw-r--r--indra/llrender/llglslshader.cpp5
-rw-r--r--indra/llrender/llrender.cpp2
-rw-r--r--indra/llrender/llrender.h6
-rw-r--r--indra/llrender/llrendertarget.cpp2
-rw-r--r--indra/llrender/llvertexbuffer.cpp78
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/app_settings/commands.xml8
-rw-r--r--indra/newview/app_settings/settings_per_account.xml11
-rw-r--r--indra/newview/llattachmentsmgr.cpp25
-rw-r--r--indra/newview/llattachmentsmgr.h3
-rw-r--r--indra/newview/llheroprobemanager.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llinventorygallerymenu.cpp25
-rw-r--r--indra/newview/llinventorygallerymenu.h3
-rw-r--r--indra/newview/llinventorypanel.cpp6
-rw-r--r--indra/newview/llinventorypanel.h1
-rw-r--r--indra/newview/llreflectionmapmanager.cpp8
-rw-r--r--indra/newview/llviewerjointattachment.cpp44
-rw-r--r--indra/newview/llviewermenu.cpp70
-rw-r--r--indra/newview/pipeline.cpp6
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/favorite_folder.pngbin0 -> 572 bytes
-rw-r--r--indra/newview/skins/default/xui/en/menu_gallery_inventory.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml7
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml14
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
40 files changed, 620 insertions, 456 deletions
diff --git a/.gitignore b/.gitignore
index a4526c5fd3..d2587ec49c 100755
--- a/.gitignore
+++ b/.gitignore
@@ -22,7 +22,9 @@ cmake_install.cmake
LICENSES
build/
build-darwin-*
+build-freebsd-*
build-linux-*
+build-mingw-*
debian/files
debian/secondlife-appearance-utility*
debian/secondlife-viewer*
diff --git a/README.md b/README.md
index 0fe4bf14f5..f70f3bcaad 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ $ cd build-`uname -s|tr '[:upper:]' '[:lower:]'`-`uname -m`
```
$ sudo port install cmake pkgconfig freealut +universal apr-util +universal boost181 +universal glm hunspell +universal freetype +universal minizip +universal pcre +universal uriparser +universal libvorbis +universal xxhashlib
$ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=11 -iwithsysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++17 -fPIC -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG -DPIC -DLL_DARWIN=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING=`uname -m` -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11 -DENABLE_SIGNING:BOOL=ON -DSIGNING_IDENTITY:STRING=- ../indra
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING=`uname -m` -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11 -DENABLE_SIGNING:BOOL=ON -DSIGNING_IDENTITY:STRING=- ../indra
$ make -j`sysctl -n hw.ncpu`
$ make install
$ open newview/Megapahit.app
@@ -49,7 +49,7 @@ $ open newview/Megapahit.app
```
$ sudo apt install cmake pkg-config libxml2-utils libalut-dev libaprutil1-dev libboost-fiber1.81-dev libboost-json1.81-dev libboost-program-options1.81-dev libboost-regex1.81-dev libboost-url1.81-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnghttp2-dev libpcre3-dev libpipewire-0.3-dev libpng-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev
$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
$ make -j`nproc`
$ cpack -G DEB
$ sudo apt install ./megapahit-`cat newview/viewer_version.txt`-Linux.deb
@@ -61,7 +61,7 @@ $ megapahit
```
$ sudo apt install cmake pkg-config libxml2-utils libaprutil1-dev libboost-fiber-dev libboost-json-dev libboost-program-options-dev libboost-regex-dev libboost-url-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnanosvg-dev libnghttp2-dev libpcre3-dev libpipewire-0.3-dev libpng-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev
$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
$ make -j`nproc`
$ cpack -G DEB
$ sudo apt install ./megapahit-`cat newview/viewer_version.txt`-Linux.deb
@@ -73,7 +73,7 @@ $ megapahit
```
$ sudo dnf install cmake gcc-c++ patchelf apr-util-devel boost-devel boost-url expat-devel fltk-devel mesa-libGLU-devel hunspell-devel minizip-ng-compat-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xxhash-devel
$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
$ make -j`nproc`
$ cpack -G RPM
$ sudo rpm -i megapahit-`cat newview/viewer_version.txt`-Linux.rpm
@@ -83,9 +83,9 @@ $ megapahit
### OpenSUSE Tumbleweed
```
-$ sudo zypper install gcc-c++ patchelf apr-util-devel boost-devel libboost_url1_86_0-devel libboost_program_options-devel expat-devel fltk-devel glu-devel hunspell-devel libnghttp2-devel nanosvg-devel pipewire-devel libpulse-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xxhash-devel minizip-devel zlib-ng-devel pcre-devel
+$ sudo zypper install gcc-c++ patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_86_0-devel expat-devel fltk-devel glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel pcre-devel pipewire-devel libpulse-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel
$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
$ make -j`nproc`
$ cpack -G RPM
$ rpm --addsign megapahit-`cat newview/viewer_version.txt`-Linux.rpm (Set up pgp public key first)
@@ -95,11 +95,11 @@ $ megapahit
### FreeBSD
```
-$ setenv LL_BUILD "-O3 -std=c++17 -fPIC"
$ sudo su -
-# portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 x11-toolkits/fltk math/glm textproc/hunspell misc/meshoptimizer archivers/minizip graphics/nanosvg devel/pcre devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis devel/xxhash
+# portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/boost-libs x11-toolkits/fltk math/glm textproc/hunspell misc/meshoptimizer archivers/minizip graphics/nanosvg www/libnghttp2 devel/pcre devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis devel/xxhash
# exit
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+$ setenv LL_BUILD "-O3 -std=c++17 -fPIC"
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
$ make -j`nproc`
$ sudo cpack -G FREEBSD
$ sudo pkg add megapahit-`cat newview/viewer_version.txt`-FreeBSD.pkg
@@ -107,6 +107,31 @@ $ sudo pkg set -yA 1 freealut apr1 fltk hunspell meshoptimizer minizip nanosvg p
$ megapahit
```
+### Gentoo
+```
+$ sudo su -
+# emerge cmake pkgconf freealut apr-util boost fltk glm hunspell minizip-ng nanosvg nghttp2 libpcre media-video/pipewire libsdl2 uriparser vlc libvorbis dev-libs/xxhash
+# exit
+$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1"
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../indra
+$ make -j`nproc`
+```
+
+### Arch
+```
+$ sudo pacman -S cmake pkgconf freealut apr-util boost-libs fltk glm hunspell minizip nanosvg libnghttp2 pcre libpipewire sdl2 uriparser vlc libvorbis xxhash
+$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1"
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../indra
+$ make -j`nproc`
+```
+
+### Windows
+```
+$ pacman -S mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-pkgconf mingw-w64-clang-aarch64-freealut mingw-w64-clang-aarch64-apr-util mingw-w64-clang-aarch64-boost mingw-w64-clang-aarch64-fltk mingw-w64-clang-aarch64-glm mingw-w64-clang-aarch64-hunspell mingw-w64-clang-aarch64-minizip mingw-w64-clang-aarch64-nghttp2 mingw-w64-clang-aarch64-pcre mingw-w64-clang-aarch64-SDL2 mingw-w64-clang-aarch64-uriparser mingw-w64-clang-aarch64-vlc mingw-w64-clang-aarch64-libvorbis mingw-w64-clang-aarch64-xxhash
+$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_WINDOWS=1"
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=OFF -DPACKAGE:BOOL=OFF ../indra
+```
+
## Contribute
Help make Megapahit better! You can get involved with improvements by filing bugs, suggesting enhancements, submitting
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 3d2b4e7406..b31b077abd 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -58,7 +58,7 @@ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported b
# Platform-specific compilation flags.
-if (WINDOWS)
+if (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU AND WINDOWS)
# Don't build DLLs.
set(BUILD_SHARED_LIBS OFF)
@@ -114,7 +114,7 @@ if (WINDOWS)
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
-endif (WINDOWS)
+endif (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU AND WINDOWS)
if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 31bb4124c2..26c0843300 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -9,13 +9,17 @@ if( USE_CONAN )
target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS )
return()
elseif( NOT USE_AUTOBUILD_3P )
- if (DARWIN)
- set(sfx "-mt")
+ if (WINDOWS)
+ set(sfx -mt)
+ target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/x86_64-w64-mingw32/include)
+ target_link_directories( ll::boost INTERFACE /opt/local/x86_64-w64-mingw32/lib)
+ elseif (DARWIN)
+ set(sfx -mt)
target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.81/include)
target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.81/lib)
- else (DARWIN)
+ else (WINDOWS)
find_package( Boost REQUIRED )
- endif (DARWIN)
+ endif (WINDOWS)
target_link_libraries( ll::boost INTERFACE
boost_context${sfx}
boost_fiber${sfx}
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index c1ef0c3447..b85de3b845 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -27,7 +27,7 @@ use_prebuilt_binary(curl)
)
endif (NOT ${curl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES})
endif (DARWIN)
-elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/curl_installed OR NOT ${curl_installed} EQUAL 0)
+elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/curl_installed OR NOT ${curl_installed} EQUAL 0))
if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz)
file(DOWNLOAD
https://github.com/secondlife/3p-curl/archive/refs/tags/v7.54.1-r1.tar.gz
@@ -89,7 +89,7 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA
)
file(WRITE ${PREBUILD_TRACKING_DIR}/curl_installed "${curl_installed}")
endif (DARWIN OR LINUX OR NOT USESYSTEMLIBS)
-if (WINDOWS)
+if (WINDOWS AND NOT USESYSTEMLIBS)
target_link_libraries(ll::libcurl INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.lib
ll::openssl
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index e491eb2e32..39c07e3377 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -19,112 +19,117 @@ if( USE_CONAN )
endif()
if( USESYSTEMLIBS )
- if( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)
+ if( WINDOWS )
+ include(FindPkgConfig)
+ pkg_check_modules(Colladadom REQUIRED collada-dom-141)
+ target_compile_definitions( ll::colladadom INTERFACE COLLADA_DOM_SUPPORT141 )
+ target_include_directories( ll::colladadom SYSTEM INTERFACE ${Colladadom_INCLUDE_DIRS} )
+ target_link_directories( ll::colladadom INTERFACE ${Colladadom_LIBRARY_DIRS} )
+ target_link_libraries( ll::colladadom INTERFACE ${Colladadom_LIBRARIES} )
+ return ()
+ elseif( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD )
# Build of the collada-dom for Linux and FreeBSD is done in
# indra/llprimitive/CMakeLists.txt
return ()
- endif( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)
- include(FindPkgConfig)
- pkg_check_modules(Minizip REQUIRED minizip)
- pkg_check_modules(Libxml2 REQUIRED libxml-2.0)
- pkg_check_modules(Libpcrecpp libpcrecpp)
- target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} )
- target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} )
- if ( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 )
- if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz)
- file(DOWNLOAD
- https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r4.tar.gz
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz
- )
- endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz)
- file(ARCHIVE_EXTRACT
- INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz
- DESTINATION ${CMAKE_BINARY_DIR}
- )
- file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4)
- if( DARWIN )
- try_compile(COLLADADOM_RESULT
- PROJECT colladadom
- SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
- BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
- TARGET collada14dom
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS}
- "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} -L${Minizip_LIBRARY_DIRS}exec/boost/1.81/lib"
- -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp
- -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES}
- -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt
- -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt
- -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS}
- -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS}
- -DBoost_CFLAGS:STRING=-I${Libpcrecpp_LIBRARY_DIRS}exec/boost/1.81/include
- -DOPT_COLLADA14:BOOL=ON
- -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada
- -DCOLLADA_DOM_SOVERSION:STRING=0
- -DCOLLADA_DOM_VERSION:STRING=2.3-r4
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15
- OUTPUT_VARIABLE colladadom_installed
- )
- if (${COLLADADOM_RESULT})
- file(
- COPY
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.2.3-r4.dylib
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.0.dylib
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.dylib
- DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
- FOLLOW_SYMLINK_CHAIN
+ else( WINDOWS )
+ include(FindPkgConfig)
+ pkg_check_modules(Minizip REQUIRED minizip)
+ pkg_check_modules(Libxml2 REQUIRED libxml-2.0)
+ pkg_check_modules(Libpcrecpp libpcrecpp)
+ target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} )
+ target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} )
+ if( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 )
+ if( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz )
+ file(DOWNLOAD
+ https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r4.tar.gz
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz
)
- endif (${COLLADADOM_RESULT})
- else( DARWIN )
- execute_process(
- COMMAND sed -i "" -e "s/SHARED/STATIC/g" 1.4/CMakeLists.txt
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src
- )
- try_compile(COLLADADOM_RESULT
- PROJECT colladadom
- SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
- BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
- TARGET collada14dom
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS}
- -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS}
- -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp
- -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES}
- -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem
- -DBoost_SYSTEM_LIBRARY:STRING=boost_system
- -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS}
- -DBoost_CFLAGS:STRING=-I${Libpcrecpp_INCLUDE_DIRS}
- -DOPT_COLLADA14:BOOL=ON
- -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada
- -DCOLLADA_DOM_SOVERSION:STRING=0
- -DCOLLADA_DOM_VERSION:STRING=2.3-r4
- OUTPUT_VARIABLE colladadom_installed
+ endif( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz )
+ file(ARCHIVE_EXTRACT
+ INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz
+ DESTINATION ${CMAKE_BINARY_DIR}
)
- if (${COLLADADOM_RESULT})
+ file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4)
+ if( DARWIN )
+ try_compile(COLLADADOM_RESULT
+ PROJECT colladadom
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
+ BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
+ TARGET collada14dom
+ CMAKE_FLAGS
+ -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS}
+ "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} -L${Minizip_LIBRARY_DIRS}exec/boost/1.81/lib"
+ -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp
+ -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES}
+ -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt
+ -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt
+ -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS}
+ -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS}
+ -DBoost_CFLAGS:STRING=-I${Libpcrecpp_LIBRARY_DIRS}exec/boost/1.81/include
+ -DOPT_COLLADA14:BOOL=ON
+ -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada
+ -DCOLLADA_DOM_SOVERSION:STRING=0
+ -DCOLLADA_DOM_VERSION:STRING=2.3-r4
+ OUTPUT_VARIABLE colladadom_installed
+ )
+ if( ${COLLADADOM_RESULT} )
+ file(
+ COPY
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.2.3-r4.dylib
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.0.dylib
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.dylib
+ DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
+ FOLLOW_SYMLINK_CHAIN
+ )
+ endif( ${COLLADADOM_RESULT} )
+ else( DARWIN )
+ execute_process(
+ COMMAND sed -i "" -e "s/SHARED/STATIC/g" 1.4/CMakeLists.txt
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src
+ )
+ try_compile(COLLADADOM_RESULT
+ PROJECT colladadom
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
+ BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4
+ TARGET collada14dom
+ CMAKE_FLAGS
+ -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS}
+ -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS}
+ -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp
+ -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES}
+ -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem
+ -DBoost_SYSTEM_LIBRARY:STRING=boost_system
+ -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS}
+ -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS}
+ -DOPT_COLLADA14:BOOL=ON
+ -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada
+ -DCOLLADA_DOM_SOVERSION:STRING=0
+ -DCOLLADA_DOM_VERSION:STRING=2.3-r4
+ OUTPUT_VARIABLE colladadom_installed
+ )
+ if( ${COLLADADOM_RESULT} )
+ file(
+ COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.a
+ DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
+ )
+ endif( ${COLLADADOM_RESULT} )
+ endif( DARWIN )
+ if( ${COLLADADOM_RESULT} )
+ file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada/1.4)
file(
- COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.a
- DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
+ COPY
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.4
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.5
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae.h
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dom.h
+ ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/modules
+ DESTINATION ${LIBS_PREBUILT_DIR}/include/collada
)
- endif (${COLLADADOM_RESULT})
- endif( DARWIN )
- if (${COLLADADOM_RESULT})
- file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada/1.4)
- file(
- COPY
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.4
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.5
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae.h
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dom.h
- ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/modules
- DESTINATION ${LIBS_PREBUILT_DIR}/include/collada
- )
- file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}")
- endif (${COLLADADOM_RESULT})
- endif( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}")
+ endif( ${COLLADADOM_RESULT} )
+ endif( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 )
+ endif( WINDOWS )
else( USESYSTEMLIBS )
use_system_binary( colladadom )
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 383051a4a6..31907d31df 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -7,7 +7,7 @@ include(Prebuilt)
include_guard()
add_library( ll::SDL INTERFACE IMPORTED )
-if (USESYSTEMLIBS AND NOT DARWIN)
+if (USESYSTEMLIBS AND NOT (WINDOWS OR DARWIN))
include(FindPkgConfig)
pkg_check_modules(Sdl2 REQUIRED sdl2)
target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake
index 0dc4069431..e1bfe10e93 100644
--- a/indra/cmake/Meshoptimizer.cmake
+++ b/indra/cmake/Meshoptimizer.cmake
@@ -8,72 +8,49 @@ add_library( ll::meshoptimizer INTERFACE IMPORTED )
if (NOT USESYSTEMLIBS)
use_system_binary(meshoptimizer)
-else (NOT USESYSTEMLIBS)
- if (NOT (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN))
- find_package(meshoptimizer)
- target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer)
- endif (NOT (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN))
+elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)
+ find_package(meshoptimizer)
+ target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer)
+ return ()
endif (NOT USESYSTEMLIBS)
-if (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR NOT USESYSTEMLIBS)
- if (USESYSTEMLIBS)
- if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0)
- if (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz)
- file(DOWNLOAD
- https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz
- ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz
- )
- endif (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz)
- file(ARCHIVE_EXTRACT
- INPUT ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz
- DESTINATION ${CMAKE_BINARY_DIR}
- )
- if (DARWIN)
- try_compile(MESHOPTIMIZER_RESULT
- PROJECT meshoptimizer
- SOURCE_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21
- BINARY_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21
- TARGET meshoptimizer
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15
- OUTPUT_VARIABLE meshoptimizer_installed
- )
- else (DARWIN)
- try_compile(MESHOPTIMIZER_RESULT
- PROJECT meshoptimizer
- SOURCE_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21
- BINARY_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21
- TARGET meshoptimizer
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- OUTPUT_VARIABLE meshoptimizer_installed
- )
- endif (DARWIN)
- if (${MESHOPTIMIZER_RESULT})
- file(
- COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/src/meshoptimizer.h
- DESTINATION ${LIBS_PREBUILT_DIR}/include/meshoptimizer
- )
- file(
- COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/libmeshoptimizer.a
- DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
- )
- file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "0")
- endif (${MESHOPTIMIZER_RESULT})
- endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0)
- else (USESYSTEMLIBS)
+if (LINUX OR NOT USESYSTEMLIBS)
use_prebuilt_binary(meshoptimizer)
- endif (USESYSTEMLIBS)
+elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0)
+ if (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz)
+ file(DOWNLOAD
+ https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz
+ ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz
+ )
+ endif (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz)
+ file(ARCHIVE_EXTRACT
+ INPUT ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz
+ DESTINATION ${CMAKE_BINARY_DIR}
+ )
+ try_compile(MESHOPTIMIZER_RESULT
+ PROJECT meshoptimizer
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21
+ BINARY_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21
+ TARGET meshoptimizer
+ OUTPUT_VARIABLE meshoptimizer_installed
+ )
+ if (${MESHOPTIMIZER_RESULT})
+ file(
+ COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/src/meshoptimizer.h
+ DESTINATION ${LIBS_PREBUILT_DIR}/include/meshoptimizer
+ )
+ file(
+ COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/libmeshoptimizer.a
+ DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
+ )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "${meshoptimizer_installed}")
+ endif (${MESHOPTIMIZER_RESULT})
+endif (LINUX OR NOT USESYSTEMLIBS)
-if (WINDOWS)
+if (NOT USESYSTEMLIBS AND WINDOWS)
target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib)
-elseif (LINUX)
+else (NOT USESYSTEMLIBS AND WINDOWS)
target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
-elseif (DARWIN)
- target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
-endif (WINDOWS)
+endif (NOT USESYSTEMLIBS AND WINDOWS)
target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
-endif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR NOT USESYSTEMLIBS)
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index 1bf6c5086c..b75bb2509d 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -8,8 +8,9 @@ add_library( ll::ndof INTERFACE IMPORTED )
if (NDOF)
if (WINDOWS OR DARWIN)
- if (USESYSTEMLIBS)
- if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0)
+ if (NOT USESYSTEMLIBS)
+ use_prebuilt_binary(libndofdev)
+ elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0))
file(DOWNLOAD
https://github.com/secondlife/3p-libndofdev/archive/refs/tags/v0.1.8e9edc7.tar.gz
${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7.tar.gz
@@ -23,11 +24,7 @@ if (NDOF)
SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev
BINARY_DIR ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev
TARGET ndofdev
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15
- -DCMAKE_C_FLAGS:STRING=-DTARGET_OS_MAC\ -Wno-int-conversion
+ CMAKE_FLAGS -DCMAKE_C_FLAGS:STRING=-DTARGET_OS_MAC\ -Wno-int-conversion
OUTPUT_VARIABLE libndofdev_installed
)
if (${LIBNDOFDEV_RESULT})
@@ -39,12 +36,9 @@ if (NDOF)
COPY ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev/src/libndofdev.dylib
DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
)
- file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "0")
+ file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "${libndofdev_installed}")
endif (${LIBNDOFDEV_RESULT})
- endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0)
- else (USESYSTEMLIBS)
- use_prebuilt_binary(libndofdev)
- endif (USESYSTEMLIBS)
+ endif (NOT USESYSTEMLIBS)
elseif (LINUX)
use_prebuilt_binary(open-libndofdev)
endif (WINDOWS OR DARWIN)
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake
index b1f776ad1d..463e4365ce 100644
--- a/indra/cmake/OpenJPEG.cmake
+++ b/indra/cmake/OpenJPEG.cmake
@@ -7,65 +7,47 @@ add_library( ll::openjpeg INTERFACE IMPORTED )
if (NOT USESYSTEMLIBS)
use_system_binary(openjpeg)
endif (NOT USESYSTEMLIBS)
-if (USESYSTEMLIBS AND NOT LINUX)
- if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0)
- if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz)
- file(DOWNLOAD
- https://github.com/secondlife/3p-openjpeg/archive/refs/tags/v2.5.0.ea12248.tar.gz
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz
- )
- endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz)
- file(ARCHIVE_EXTRACT
- INPUT ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz
- DESTINATION ${CMAKE_BINARY_DIR}
- )
- if (DARWIN)
- try_compile(OPENJPEG_RESULT
- PROJECT OPENJPEG
- SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg
- BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg
- TARGET openjp2
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15
- OUTPUT_VARIABLE openjpeg_installed
- )
- else (DARWIN)
- try_compile(OPENJPEG_RESULT
- PROJECT OPENJPEG
- SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg
- BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg
- TARGET openjp2
- CMAKE_FLAGS
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
- OUTPUT_VARIABLE openjpeg_installed
- )
- endif (DARWIN)
- if (${OPENJPEG_RESULT})
- file(
- COPY
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/cio.h
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/event.h
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/openjpeg.h
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_config.h
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_config_private.h
- ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_stdint.h
- DESTINATION ${LIBS_PREBUILT_DIR}/include/openjpeg
- )
- file(
- COPY ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/bin/libopenjp2.a
- DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
- )
- file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}")
- endif (${OPENJPEG_RESULT})
- endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0)
-else (USESYSTEMLIBS AND NOT LINUX)
+if (LINUX OR NOT USESYSTEMLIBS)
use_prebuilt_binary(openjpeg)
-endif (USESYSTEMLIBS AND NOT LINUX)
+elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0)
+ if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz)
+ file(DOWNLOAD
+ https://github.com/secondlife/3p-openjpeg/archive/refs/tags/v2.5.0.ea12248.tar.gz
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz
+ )
+ endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz)
+ file(ARCHIVE_EXTRACT
+ INPUT ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz
+ DESTINATION ${CMAKE_BINARY_DIR}
+ )
+ try_compile(OPENJPEG_RESULT
+ PROJECT OPENJPEG
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg
+ BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg
+ TARGET openjp2
+ CMAKE_FLAGS
+ -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
+ OUTPUT_VARIABLE openjpeg_installed
+ )
+ if (${OPENJPEG_RESULT})
+ file(
+ COPY
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/cio.h
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/event.h
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/openjpeg.h
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_config.h
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_config_private.h
+ ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_stdint.h
+ DESTINATION ${LIBS_PREBUILT_DIR}/include/openjpeg
+ )
+ file(
+ COPY ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/bin/libopenjp2.a
+ DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
+ )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}")
+ endif (${OPENJPEG_RESULT})
+endif (LINUX OR NOT USESYSTEMLIBS)
target_link_libraries(ll::openjpeg INTERFACE openjp2 )
target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 801850b7ab..c6481c89e9 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -42,7 +42,7 @@ use_prebuilt_binary(openssl)
)
endif (NOT ${ssl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES})
endif (DARWIN)
-elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openssl_installed OR NOT ${openssl_installed} EQUAL 0)
+elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openssl_installed OR NOT ${openssl_installed} EQUAL 0))
if (NOT EXISTS ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w.tar.gz)
file(DOWNLOAD
https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1w.tar.gz
@@ -55,135 +55,137 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA
)
execute_process(
COMMAND ./config no-shared
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w
)
execute_process(
COMMAND make -j${MAKE_JOBS}
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w
RESULT_VARIABLE openssl_installed
)
file(
COPY
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/aes.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1_mac.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1err.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1t.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/async.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asyncerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bio.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bioerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/blowfish.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bn.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bnerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/buffer.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/buffererr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/camellia.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cast.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cmac.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cms.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cmserr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/comp.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/comperr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/conf.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/conf_api.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/conferr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/crypto.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cryptoerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ct.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cterr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/des.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dh.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dherr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dsa.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dsaerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dtls1.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/e_os2.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ebcdic.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ec.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ecdh.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ecdsa.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ecerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/engine.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/engineerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/err.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/evp.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/evperr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/hmac.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/idea.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/kdf.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/kdferr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/lhash.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/md2.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/md4.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/md5.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/mdc2.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/modes.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/obj_mac.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/objects.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/objectserr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ocsp.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ocsperr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/opensslconf.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/opensslv.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ossl_typ.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pem.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pem2.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pemerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs12.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs12err.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs7.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs7err.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rand.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rand_drbg.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/randerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rc2.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rc4.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rc5.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ripemd.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rsa.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rsaerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/safestack.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/seed.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/sha.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/srp.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/srtp.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ssl.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ssl2.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ssl3.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/sslerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/stack.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/store.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/storeerr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/symhacks.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/tls1.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ts.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/tserr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/txt_db.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ui.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/uierr.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/whrlpool.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509_vfy.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509err.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509v3.h
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509v3err.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/aes.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1_mac.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1err.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1t.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/async.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asyncerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bio.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bioerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/blowfish.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bn.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bnerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/buffer.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/buffererr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/camellia.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cast.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cmac.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cms.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cmserr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/comp.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/comperr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/conf.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/conf_api.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/conferr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/crypto.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cryptoerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ct.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cterr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/des.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dh.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dherr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dsa.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dsaerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dtls1.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/e_os2.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ebcdic.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ec.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ecdh.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ecdsa.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ecerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/engine.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/engineerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/err.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/evp.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/evperr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/hmac.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/idea.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/kdf.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/kdferr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/lhash.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/md2.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/md4.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/md5.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/mdc2.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/modes.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/obj_mac.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/objects.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/objectserr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ocsp.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ocsperr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/opensslconf.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/opensslv.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ossl_typ.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pem.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pem2.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pemerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs12.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs12err.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs7.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs7err.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rand.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rand_drbg.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/randerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rc2.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rc4.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rc5.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ripemd.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rsa.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rsaerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/safestack.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/seed.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/sha.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/srp.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/srtp.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ssl.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ssl2.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ssl3.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/sslerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/stack.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/store.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/storeerr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/symhacks.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/tls1.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ts.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/tserr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/txt_db.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ui.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/uierr.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/whrlpool.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509_vfy.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509err.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509v3.h
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509v3err.h
DESTINATION ${LIBS_PREBUILT_DIR}/include/openssl
)
file(
COPY
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/libcrypto.a
- ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/libssl.a
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/libcrypto.a
+ ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/libssl.a
DESTINATION ${LIBS_PREBUILT_DIR}/lib/release
)
file(WRITE ${PREBUILD_TRACKING_DIR}/openssl_installed "${openssl_installed}")
endif (DARWIN OR LINUX OR NOT USESYSTEMLIBS)
-if (WINDOWS)
+if (WINDOWS AND NOT USESYSTEMLIBS)
target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.lib Crypt32.lib)
elseif (LINUX)
target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.a ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.a dl)
else()
target_link_libraries(ll::openssl INTERFACE ssl crypto)
-endif (WINDOWS)
+endif (WINDOWS AND NOT USESYSTEMLIBS)
+if (NOT (WINDOWS AND USESYSTEMLIBS))
target_include_directories( ll::openssl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
+endif (NOT (WINDOWS AND USESYSTEMLIBS))
diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake
index 0a5191ff08..13f5ebf862 100644
--- a/indra/cmake/ViewerMiscLibs.cmake
+++ b/indra/cmake/ViewerMiscLibs.cmake
@@ -1,12 +1,12 @@
# -*- cmake -*-
include(Prebuilt)
-if (NOT DARWIN)
+if (NOT (WINDOWS OR DARWIN))
add_library( ll::fontconfig INTERFACE IMPORTED )
find_package(Fontconfig REQUIRED)
target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig )
-endif (NOT DARWIN)
+endif (NOT (WINDOWS OR DARWIN))
if( USE_AUTOBUILD_3P )
use_prebuilt_binary(libhunspell)
@@ -16,8 +16,8 @@ if (NOT USESYSTEMLIBS)
use_prebuilt_binary(slvoice)
endif (NOT USESYSTEMLIBS)
-if ((${LINUX_DISTRO} MATCHES debian OR DARWIN) OR NOT USESYSTEMLIBS)
+if ((${LINUX_DISTRO} MATCHES debian OR WINDOWS OR DARWIN) OR NOT USESYSTEMLIBS)
use_prebuilt_binary(nanosvg)
-endif ((${LINUX_DISTRO} MATCHES debian OR DARWIN) OR NOT USESYSTEMLIBS)
+endif ((${LINUX_DISTRO} MATCHES debian OR WINDOWS OR DARWIN) OR NOT USESYSTEMLIBS)
use_prebuilt_binary(viewer-fonts)
use_prebuilt_binary(emoji_shortcodes)
diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake
index 89ac794c89..eec4e2ce7a 100644
--- a/indra/cmake/WebRTC.cmake
+++ b/indra/cmake/WebRTC.cmake
@@ -8,7 +8,7 @@ add_library( ll::webrtc INTERFACE IMPORTED )
target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp")
if (${LINUX_DISTRO} MATCHES debian OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
use_prebuilt_binary(webrtc)
-elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD)
+elseif (NOT (WINDOWS OR CMAKE_SYSTEM_NAME MATCHES FreeBSD))
target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1)
if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0)
if (DARWIN)
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 9fb916acfe..e79d67c5c7 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -327,16 +327,15 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
GLuint64 primitives_generated = 0;
glGetQueryObjectui64v(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated);
#else
- GLuint samples_passed = 0;
- glGetQueryObjectuiv(mSamplesQuery, GL_QUERY_RESULT, &samples_passed);
-
GLuint primitives_generated = 0;
glGetQueryObjectuiv(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated);
#endif
sTotalTimeElapsed += time_elapsed;
+#if GL_VERSION_1_5
sTotalSamplesDrawn += samples_passed;
mSamplesDrawn += samples_passed;
+#endif
U32 tri_count = (U32)primitives_generated / 3;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 2c75a177f7..db3a04c581 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -2031,9 +2031,11 @@ void LLRender::debugTexUnits(void)
case LLTexUnit::TT_TEXTURE:
LL_CONT << "Texture 2D";
break;
+#if GL_VERSION_3_1
case LLTexUnit::TT_RECT_TEXTURE:
LL_CONT << "Texture Rectangle";
break;
+#endif
case LLTexUnit::TT_CUBE_MAP:
LL_CONT << "Cube Map";
break;
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index e31db7bdf2..7162ce51a4 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -69,10 +69,16 @@ public:
typedef enum
{
TT_TEXTURE = 0, // Standard 2D Texture
+#if GL_VERSION_3_1
TT_RECT_TEXTURE, // Non power of 2 texture
+#endif
TT_CUBE_MAP, // 6-sided cube map texture
+#if GL_VERSION_4_0
TT_CUBE_MAP_ARRAY, // Array of cube maps
+#endif
+#if GL_VERSION_3_2
TT_MULTISAMPLE_TEXTURE, // see GL_ARB_texture_multisample
+#endif
TT_TEXTURE_3D, // standard 3D Texture
TT_NONE, // No texture type is currently enabled
} eTextureType;
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 180b8677ee..0e4aa2ee7a 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -255,12 +255,14 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
stop_glerror();
}
+#if GL_VERSION_3_1
if (mUsage != LLTexUnit::TT_RECT_TEXTURE)
{
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
stop_glerror();
}
else
+#endif
{
// ATI doesn't support mirrored repeat for rectangular textures.
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index f881a12770..52ee998dcb 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -386,9 +386,6 @@ class LLDefaultVBOPool final : public LLVBOPool
{
public:
typedef std::chrono::steady_clock::time_point Time;
-
- U32 mMappingMode;
-
struct Entry
{
U8* mData;
@@ -398,7 +395,6 @@ public:
~LLDefaultVBOPool() override
{
- if(mMappingMode == 3) return;
clear();
}
@@ -417,8 +413,7 @@ public:
U64 getVramBytesUsed() override
{
- if(mMappingMode == 3) return mAllocated;
- else return mAllocated + mReserved;
+ return mAllocated + mReserved;
}
// increase the size to some common value (e.g. a power of two) to increase hit rate
@@ -440,20 +435,6 @@ public:
llassert(data == nullptr); // non null data indicates a buffer that wasn't freed
llassert(size >= 2); // any buffer size smaller than a single index is nonsensical
- if(mMappingMode == 3)
- {
- mAllocated += size;
-
- { //allocate a new buffer
- LL_PROFILE_GPU_ZONE("vbo alloc");
- // ON OS X, we don't allocate a VBO until the last possible moment
- // in unmapBuffer
- data = (U8*) ll_aligned_malloc_16(size);
- //STOP_GLERROR;
- }
- return;
- }
-
mDistributed += size;
adjustSize(size);
mAllocated += size;
@@ -507,25 +488,6 @@ public:
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
llassert(type == GL_ARRAY_BUFFER || type == GL_ELEMENT_ARRAY_BUFFER);
llassert(size >= 2);
-
- if(mMappingMode == 3)
- {
- if (data)
- {
- ll_aligned_free_16(data);
- }
-
- mAllocated -= size;
- //STOP_GLERROR;
- if (name)
- {
- glDeleteBuffers(1, &name);
- }
- //STOP_GLERROR;
-
- return;
- }
-
llassert(name != 0);
llassert(data != nullptr);
@@ -1374,35 +1336,7 @@ U8* LLVertexBuffer::mapIndexBuffer(U32 index, S32 count)
// dst -- mMappedData or mMappedIndexData
void LLVertexBuffer::flush_vbo(GLenum target, U32 start, U32 end, void* data, U8* dst)
{
- if(sMappingMode == 2)
- {
- //LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb glMapBufferRange");
- if (end == 0) return;
- U32 buffer_size = end-start+1;
- U8 * mptr = (U8*) glMapBufferRange( target, start, end-start+1, GL_MAP_WRITE_BIT);
-
- if (mptr)
- {
- std::memcpy(mptr, (U8*) data, buffer_size);
- if(!glUnmapBuffer(target)) LL_WARNS() << "glUnmapBuffer() failed" << LL_ENDL;
- }
- else LL_WARNS() << "glMapBufferRange() returned NULL" << LL_ENDL;
- return;
- }
-
- if(sMappingMode == 3)
- {
- LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb memcpy");
- //STOP_GLERROR;
- // copy into mapped buffer
- memcpy(dst+start, data, end-start+1);
- return;
- }
-
- llassert(target == GL_ARRAY_BUFFER ? sGLRenderBuffer == mGLBuffer : sGLRenderIndices == mGLIndices);
-
- // skip mapped data and stream to GPU via glBufferSubData
- if (end != 0)
+ if (gGLManager.mIsApple)
{
// on OS X, flush_vbo doesn't actually write to the GL buffer, so be sure to call
// _mapBuffer to tag the buffer for flushing to GL
@@ -1698,14 +1632,6 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, U32 in
// Set for rendering
void LLVertexBuffer::setBuffer()
{
- if(sMappingMode == 3)
- {
- if (!mGLBuffer)
- {
- return;
- }
- }
-
STOP_GLERROR;
if (mMapped)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 4c10e13d98..5099e72f6e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -55,9 +55,7 @@ include(LLPrimitive)
if (ENABLE_MEDIA_PLUGINS)
include(LibVLCPlugin)
- if (DARWIN OR LINUX)
- include(CEFPlugin)
- endif (DARWIN OR LINUX)
+ include(CEFPlugin)
endif (ENABLE_MEDIA_PLUGINS)
if (NOT (USESYSTEMLIBS OR HAVOK_TPV))
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index b47ceff446..f2ab740646 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -295,4 +295,12 @@
is_running_function="Floater.IsOpen"
is_running_parameters="performance"
/>
+ <command name="favoritefolder"
+ available_in_toybox="true"
+ icon="Command_FavoriteFolder_Icon"
+ label_ref="Command_FavoriteFolder_Label"
+ tooltip_ref="Command_FavoriteFolder_Tooltip"
+ execute_function="Inventory.OpenFavoriteFolder"
+ is_running_function="Inventory.IsFavoriteFolderOpen"
+ />
</commands>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 6b788dd78f..80a4bec57f 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -458,5 +458,16 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>FavoriteFolder</key>
+ <map>
+ <key>Comment</key>
+ <string>Favorite inventory folder (UUID)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp
index 8b5db2c0fa..73ac895d0d 100644
--- a/indra/newview/llattachmentsmgr.cpp
+++ b/indra/newview/llattachmentsmgr.cpp
@@ -545,3 +545,28 @@ void LLAttachmentsMgr::spamStatusInfo()
}
#endif
}
+
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+void LLAttachmentsMgr::refreshAttachments()
+{
+ if (!isAgentAvatarValid())
+ return;
+
+ for (const auto& kvpAttachPt : gAgentAvatarp->mAttachmentPoints)
+ {
+ for (const LLViewerObject* pAttachObj : kvpAttachPt.second->mAttachedObjects)
+ {
+ const LLUUID& idItem = pAttachObj->getAttachmentItemID();
+ if ( (mAttachmentRequests.wasRequestedRecently(idItem)) || (pAttachObj->isTempAttachment()) )
+ continue;
+
+ AttachmentsInfo attachment;
+ attachment.mItemID = idItem;
+ attachment.mAttachmentPt = kvpAttachPt.first;
+ attachment.mAdd = true;
+ mPendingAttachments.push_back(attachment);
+ mAttachmentRequests.addTime(idItem);
+ }
+ }
+}
+// [/SL:KB]
diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h
index 2428acfb38..de36253339 100644
--- a/indra/newview/llattachmentsmgr.h
+++ b/indra/newview/llattachmentsmgr.h
@@ -87,6 +87,9 @@ public:
bool isAttachmentStateComplete() const;
+ // [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+ void refreshAttachments();
+
private:
class LLItemRequestTimes: public std::map<LLUUID,LLTimer>
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index ce419498cf..368306ded8 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -414,8 +414,10 @@ void LLHeroProbeManager::generateRadiance(LLReflectionMap* probe)
gHeroRadianceGenProgram.bind();
mVertexBuffer->setBuffer();
+#if GL_VERSION_4_0
S32 channel = gHeroRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
mTexture->bind(channel);
+#endif
gHeroRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
gHeroRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
gHeroRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, mHeroProbeStrength);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 896c7d8d70..d511171679 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4431,6 +4431,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
{
mWearables=true;
}
+
+ items.push_back(std::string("Set favorite folder"));
}
else
{
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index dbf4821ca1..0c35a7f695 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -92,6 +92,7 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu()
registrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryGalleryContextMenu::doToSelected, this, _2));
registrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::fileUploadLocation, this, _2));
+ registrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryGalleryContextMenu::setFavoriteFolder, this));
registrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
registrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
registrar.add("Inventory.DoCreate", [this](LLUICtrl*, const LLSD& data)
@@ -110,6 +111,7 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu()
registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery)));
enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2));
+ enable_registrar.add("Inventory.CanSetFavoriteFolder", boost::bind(&LLInventoryGalleryContextMenu::canSetFavoriteFolder, this));
enable_registrar.add("Inventory.EnvironmentEnabled", [](LLUICtrl*, const LLSD&)
{
@@ -504,6 +506,25 @@ bool LLInventoryGalleryContextMenu::canSetUploadLocation(const LLSD& userdata)
return true;
}
+void LLInventoryGalleryContextMenu::setFavoriteFolder()
+{
+ gSavedPerAccountSettings.setString("FavoriteFolder", mUUIDs.front().asString());
+}
+
+bool LLInventoryGalleryContextMenu::canSetFavoriteFolder()
+{
+ if (mUUIDs.size() != 1)
+ {
+ return false;
+ }
+ LLInventoryCategory* cat = gInventory.getCategory(mUUIDs.front());
+ if (!cat)
+ {
+ return false;
+ }
+ return true;
+}
+
bool is_inbox_folder(LLUUID item_id)
{
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
@@ -769,6 +790,8 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
items.push_back(std::string("upload_def"));
}
+ items.push_back(std::string("Set favorite folder"));
+
if(is_outfits && !isRootFolder())
{
items.push_back(std::string("New Outfit"));
@@ -843,6 +866,8 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
{
disabled_items.push_back(std::string("Copy"));
}
+
+ disabled_items.push_back(std::string("Set favorite folder"));
}
if((obj->getType() == LLAssetType::AT_SETTINGS)
|| ((obj->getType() <= LLAssetType::AT_GESTURE)
diff --git a/indra/newview/llinventorygallerymenu.h b/indra/newview/llinventorygallerymenu.h
index 7c3545432b..7f6598e171 100644
--- a/indra/newview/llinventorygallerymenu.h
+++ b/indra/newview/llinventorygallerymenu.h
@@ -49,6 +49,9 @@ protected:
void fileUploadLocation(const LLSD& userdata);
bool canSetUploadLocation(const LLSD& userdata);
+ void setFavoriteFolder();
+ bool canSetFavoriteFolder();
+
static void onRename(const LLSD& notification, const LLSD& response);
private:
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 46562c78b3..bf12e6a7e0 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -185,6 +185,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryPanel::setFavoriteFolder, this));
mCommitCallbackRegistrar.add("Inventory.OpenNewFolderWindow", boost::bind(&LLInventoryPanel::openSingleViewInventory, this, LLUUID()));
}
@@ -1759,6 +1760,11 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
}
}
+void LLInventoryPanel::setFavoriteFolder()
+{
+ gSavedPerAccountSettings.setString("FavoriteFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+}
+
void LLInventoryPanel::openSingleViewInventory(LLUUID folder_id)
{
LLPanelMainInventory::newFolderWindow(folder_id.isNull() ? LLFolderBridge::sSelf.get()->getUUID() : folder_id);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 56909c8d98..ab17196e5f 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -225,6 +225,7 @@ public:
void doCreate(const LLSD& userdata);
bool beginIMSession();
void fileUploadLocation(const LLSD& userdata);
+ void setFavoriteFolder();
void openSingleViewInventory(LLUUID folder_id = LLUUID());
void purgeSelectedItems();
bool attachObject(const LLSD& userdata);
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index e1aee1da4d..1b2cc7cc64 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -828,8 +828,10 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
gRadianceGenProgram.bind();
mVertexBuffer->setBuffer();
+#if GL_VERSION_4_0
S32 channel = gRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
mTexture->bind(channel);
+#endif
gRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, 1.f);
@@ -876,8 +878,10 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
{
//generate irradiance map
gIrradianceGenProgram.bind();
+#if GL_VERSION_4_0
S32 channel = gIrradianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
mTexture->bind(channel);
+#endif
gIrradianceGenProgram.uniform1i(sSourceIdx, sourceIdx);
gIrradianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD);
@@ -910,11 +914,11 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4);
S32 res = mMipChain[i].getWidth();
- mIrradianceMaps->bind(channel);
#if GL_VERSION_4_0
+ mIrradianceMaps->bind(channel);
glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i - start_mip, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res);
-#endif
mTexture->bind(channel);
+#endif
}
}
}
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index 511fac9788..e5cf1bcb69 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -28,6 +28,9 @@
#include "llviewerjointattachment.h"
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+#include "llagent.h"
+// [/SL:KB]
#include "llviewercontrol.h"
#include "lldrawable.h"
#include "llgl.h"
@@ -168,7 +171,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
//-----------------------------------------------------------------------------
bool LLViewerJointAttachment::addObject(LLViewerObject* object)
{
- object->extractAttachmentItemID();
+// object->extractAttachmentItemID();
// Same object reattached
if (isObjectAttached(object))
@@ -179,17 +182,39 @@ bool LLViewerJointAttachment::addObject(LLViewerObject* object)
// re-connect object to the joint correctly
}
+// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-01-13 (Catznip-2.4)
+ // LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above
+ object->extractAttachmentItemID();
+// [/SL:KB]
+
// Two instances of the same inventory item attached --
// Request detach, and kill the object in the meantime.
- if (getAttachedObject(object->getAttachmentItemID()))
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+ if (LLViewerObject* pAttachObj = getAttachedObject(object->getAttachmentItemID()))
{
LL_INFOS() << "(same object re-attached)" << LL_ENDL;
- object->markDead();
-
- // If this happens to be attached to self, then detach.
- LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID());
- return false;
+ pAttachObj->markDead();
+ if (pAttachObj->permYouOwner())
+ {
+ gMessageSystem->newMessage("ObjectDetach");
+ gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
+ gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, pAttachObj->getLocalID());
+ gMessageSystem->sendReliable(gAgent.getRegionHost());
+ }
}
+// [/SL:KB]
+// if (getAttachedObject(object->getAttachmentItemID()))
+// {
+// LL_INFOS() << "(same object re-attached)" << LL_ENDL;
+// object->markDead();
+//
+// // If this happens to be attached to self, then detach.
+// LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID());
+// return FALSE;
+// }
mAttachedObjects.push_back(object);
setupDrawable(object);
@@ -461,7 +486,10 @@ const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &o
++iter)
{
const LLViewerObject* attached_object = iter->get();
- if (attached_object->getAttachmentItemID() == object_id)
+// if (attached_object->getAttachmentItemID() == object_id)
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+ if ( (attached_object->getAttachmentItemID() == object_id) && (!attached_object->isDead()) )
+// [/SL:KB]
{
return attached_object;
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a78fe270bc..c1607eb13f 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -39,6 +39,7 @@
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llinventorypanel.h"
+#include "llsidepanelinventory.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llviewereventrecorder.h"
@@ -52,6 +53,9 @@
#include "llagentui.h"
#include "llagentwearables.h"
#include "llagentpilot.h"
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+#include "llattachmentsmgr.h"
+// [/SL:KB]
#include "llcompilequeue.h"
#include "llconsole.h"
#include "lldebugview.h"
@@ -2171,6 +2175,13 @@ class LLAdvancedRebakeTextures : public view_listener_t
};
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+void handle_refresh_attachments()
+{
+ LLAttachmentsMgr::instance().refreshAttachments();
+}
+// [/SL:KB]
+
#if 1 //ndef LL_RELEASE_FOR_DOWNLOAD
///////////////////////////
// DEBUG AVATAR TEXTURES //
@@ -6732,6 +6743,59 @@ void handle_give_money_dialog()
}
}
+LLFloaterSidePanelContainer* get_favorite_inventory_folder()
+{
+ LLUUID folder_id = LLUUID(gSavedPerAccountSettings.getString("FavoriteFolder"));
+ if (!folder_id.isNull())
+ {
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end();)
+ {
+ LLFloaterSidePanelContainer* inventory_container = dynamic_cast<LLFloaterSidePanelContainer*>(*iter++);
+ if (inventory_container)
+ {
+ LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(inventory_container->findChild<LLPanel>("main_panel", true));
+ if (sidepanel_inventory)
+ {
+ LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
+ if (main_inventory && main_inventory->isSingleFolderMode()
+ && (main_inventory->getCurrentSFVRoot() == folder_id))
+ {
+ return inventory_container;
+ }
+ }
+ }
+ }
+ }
+
+ return NULL;
+}
+
+void toggle_favorite_inventory_folder()
+{
+ LLUUID folder_id = LLUUID(gSavedPerAccountSettings.getString("FavoriteFolder"));
+ if ((folder_id.isNull()) || (!gInventory.getCategory(folder_id)))
+ {
+ LLNotificationsUtil::add("MissingFavoriteFolder");
+ return;
+ }
+
+ LLFloaterSidePanelContainer* inventory_container = get_favorite_inventory_folder();
+ if (inventory_container)
+ {
+ inventory_container->closeFloater();
+ }
+ else
+ {
+ LLPanelMainInventory::newFolderWindow(folder_id);
+ }
+}
+
+bool favorite_inventory_folder_visible()
+{
+ return (get_favorite_inventory_folder() != NULL);
+}
+
bool enable_pay_avatar()
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -9853,6 +9917,9 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedCheckDebugCharacterVis(), "Advanced.CheckDebugCharacterVis");
view_listener_t::addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments");
view_listener_t::addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures");
+// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0
+ commit.add("Advanced.RefreshAttachments", boost::bind(&handle_refresh_attachments));
+// [/SL:KB]
view_listener_t::addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
view_listener_t::addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
// Advanced > Network
@@ -10058,6 +10125,9 @@ void initialize_menus()
commit.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow));
+ commit.add("Inventory.OpenFavoriteFolder", boost::bind(&toggle_favorite_inventory_folder));
+ enable.add("Inventory.IsFavoriteFolderOpen", boost::bind(&favorite_inventory_folder_visible));
+
enable.add("EnablePayObject", boost::bind(&enable_pay_object));
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 069a70b63b..f95090d134 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -9173,8 +9173,13 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
return;
}
+#if GL_VERSION_4_0
S32 channel = shader.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
+#else
+ S32 channel;
+#endif
bool bound = false;
+#if GL_VERSION_4_0
if (channel > -1 && mReflectionMapManager.mTexture.notNull())
{
mReflectionMapManager.mTexture->bind(channel);
@@ -9205,6 +9210,7 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
setEnvMat(shader);
}
+#endif
// reflection probe shaders generally sample the scene map as well for SSR
channel = shader.enableTexture(LLShaderMgr::SCENE_MAP);
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 11eafcb45d..4763396d50 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -162,6 +162,7 @@ with the same filename but different name
<texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" />
<texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" />
<texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" />
+ <texture name="Command_FavoriteFolder_Icon" file_name="toolbar_icons/favorite_folder.png" preload="true" />
<texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" />
<texture name="Caret_Right_Icon" file_name="toolbar_icons/caret_right.png" preload="true" scale.left="5" scale.top="15" scale.right="28" scale.bottom="1" />
<texture name="Caret_Left_Icon" file_name="toolbar_icons/caret_left.png" preload="true" scale.left="1" scale.top="15" scale.right="23" scale.bottom="1" />
diff --git a/indra/newview/skins/default/textures/toolbar_icons/favorite_folder.png b/indra/newview/skins/default/textures/toolbar_icons/favorite_folder.png
new file mode 100644
index 0000000000..811efffc0b
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/favorite_folder.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
index 16907d3577..99f84fe808 100644
--- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
@@ -715,6 +715,16 @@
function="Inventory.CanSetUploadLocation" />
</menu_item_call>
</menu>
+ <menu_item_call
+ label="Use as favorite folder"
+ layout="topleft"
+ name="Set favorite folder">
+ <menu_item_call.on_click
+ function="Inventory.SetFavoriteFolder"
+ parameter="favorite" />
+ <menu_item_call.on_visible
+ function="Inventory.CanSetFavoriteFolder" />
+ </menu_item_call>
<menu_item_separator
layout="topleft"
name="Marketplace Separator" />
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index d8aac71dd5..a72f610abb 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -996,6 +996,13 @@
parameter="pbr_material" />
</menu_item_call>
</menu>
+ <menu_item_call
+ label="Use as favorite folder"
+ layout="topleft"
+ name="Set favorite folder">
+ <menu_item_call.on_click
+ function="Inventory.SetFavoriteFolder" />
+ </menu_item_call>
<menu_item_separator
layout="topleft"
name="Marketplace Separator" />
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 786ef6e4d9..53650d69b8 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -37,6 +37,13 @@
parameter="" />
</menu_item_call>
<menu_item_call
+ label="Favorite Inventory Folder"
+ layout="topleft"
+ name="Favorite Folder">
+ <menu_item_call.on_click
+ function="Inventory.OpenFavoriteFolder" />
+ </menu_item_call>
+ <menu_item_call
label="Places..."
name="Places"
shortcut="control|L">
@@ -493,6 +500,13 @@
function="Avatar.ResetSelfSkeletonAndAnimations" />
</menu_item_call>
<menu_item_call
+ label="Refresh attachments"
+ name="Refresh attachments"
+ shortcut="alt|shift|R">
+ <menu_item_call.on_click
+ function="Advanced.RefreshAttachments" />
+ </menu_item_call>
+ <menu_item_call
label="Attachment scripts..."
name="MyScripts">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a03259bd1b..805f156e81 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12587,4 +12587,16 @@ are wearing now.
yestext="OK"/>
</notification>
+ <notification
+ icon="alertmodal.tga"
+ name="MissingFavoriteFolder"
+ type="alertmodal">
+Favorite folder is missing.
+
+Select the "use as favorite folder" from a folder's menu to set it as the favorite folder.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
</notifications>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 232586636b..25779ca2c6 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4212,6 +4212,7 @@ name="Command_360_Capture_Label">360 snapshot</string>
<string name="Command_Speak_Label">Speak</string>
<string name="Command_View_Label">Camera controls</string>
<string name="Command_Voice_Label">Voice settings</string>
+ <string name="Command_FavoriteFolder_Label">Favorite folder</string>
<string
name="Command_360_Capture_Tooltip">Capture a 360 equirectangular image</string>
@@ -4245,6 +4246,7 @@ name="Command_360_Capture_Tooltip">Capture a 360 equirectangular image</string>
<string name="Command_Speak_Tooltip">Speak with people nearby using your microphone</string>
<string name="Command_View_Tooltip">Changing camera angle</string>
<string name="Command_Voice_Tooltip">Volume controls for calls and people near you in world</string>
+ <string name="Command_FavoriteFolder_Tooltip">Open your favorite inventory folder</string>
<string name="Toolbar_Bottom_Tooltip">currently in your bottom toolbar</string>
<string name="Toolbar_Left_Tooltip" >currently in your left toolbar</string>