From 8276e835d15c2c6295b00890f9a4765eddac2a0d Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 9 Aug 2024 18:16:17 +0800 Subject: Automatically download and install Dullahan For now it still downloads even though the builder has downloaded the files before. You could temporarily comment out the relevant use_prebuilt_binary calls to skip all the re-downloads and re-installs. --- README.md | 6 ++---- indra/cmake/CEFPlugin.cmake | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5806aa2e71..c450152ec7 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwinuniversal-233471337.tar.bz2 -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz -o meshoptimizer-0.21.tar.gz -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz -o meshoptimizer-0.21.tar.gz -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 $ cd - $ cd .. $ tar xf ~/Downloads/meshoptimizer-0.21.tar.gz @@ -100,7 +100,6 @@ $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 $ make -j`sysctl -n hw.ncpu` $ cd ../../../../viewer/build/universal-apple-darwin`uname -r`/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-darwin64-513145c.tar.zst -$ tar xf ~/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwinuniversal-233471337.tar.bz2 $ tar xf ~/Downloads/nanosvg-2022.09.27-darwin64-580364.tar.bz2 $ tar xf ~/Downloads/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst $ tar xf ~/Downloads/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst @@ -125,11 +124,10 @@ $ open newview/Megapahit.app ``` $ mkdir -p build/`uname -m`-linux-gnu/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/dullahan/releases/download/v1.14.0-r2/dullahan-1.14.0.202404051708_118.4.1_g3dd6078_chromium-118.0.5993.54-linux64-8573290624.tar.zst -OL https://github.com/secondlife/3p-open-libndofdev/releases/download/v1.14-r2/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst -OL https://github.com/uclouvain/openjpeg/releases/download/v2.5.2/openjpeg-v2.5.2-linux-x86_64.tar.gz -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/3p-open-libndofdev/releases/download/v1.14-r2/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst -OL https://github.com/uclouvain/openjpeg/releases/download/v2.5.2/openjpeg-v2.5.2-linux-x86_64.tar.gz -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst $ cd - $ cd build/`uname -m`-linux-gnu/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-linux64-513145c.tar.zst -$ tar xf ~/Downloads/dullahan-1.14.0.202404051708_118.4.1_g3dd6078_chromium-118.0.5993.54-linux64-8573290624.tar.zst $ tar xf ~/Downloads/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst $ tar xf ~/Downloads/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst $ cd ../../../.. diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 7b0a945bc4..14359b4622 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -5,8 +5,23 @@ include(Prebuilt) include_guard() add_library( ll::cef INTERFACE IMPORTED ) -#use_prebuilt_binary(dullahan) -target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/cef) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process(COMMAND curl + -O + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + WORKING_DIRECTORY $ENV{HOME}/Downloads + ) + execute_process(COMMAND tar + xf + $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE dullahan_installed + ) +else () +use_prebuilt_binary(dullahan) +endif () + +target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) target_link_libraries( ll::cef INTERFACE -- cgit v1.2.3 From 6d8eb0535f267d7e4ebd1302883628617fe1f8ea Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 9 Aug 2024 18:19:01 +0800 Subject: For successfully compiling libndofdev on Xcode 15 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c450152ec7..156f86709d 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ $ unset CFLAGS $ cd ../../../../3p-libndofdev/libndofdev $ mkdir -p build/aarch64-apple-darwin`uname -r` $ cd build/aarch64-apple-darwin`uname -r` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_C_FLAGS:STRING=-DTARGET_OS_MAC ../.. +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_C_FLAGS:STRING="-DTARGET_OS_MAC -Wno-int-conversion" ../.. $ make -j`sysctl -n hw.ncpu` $ cd ../../../../viewer/build/universal-apple-darwin`uname -r`/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-darwin64-513145c.tar.zst -- cgit v1.2.3 From 5e35f9be4861b39b40644ce351b5d49b8b8b797b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 9 Aug 2024 19:07:10 +0800 Subject: Download Dullahan macOS arm64 only if it hasn't --- indra/cmake/CEFPlugin.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 14359b4622..fc7929a226 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -5,7 +5,7 @@ include(Prebuilt) include_guard() add_library( ll::cef INTERFACE IMPORTED ) -if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0)) execute_process(COMMAND curl -O https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 -- cgit v1.2.3 From ebc9ace4259c71350582bafa8cc502a78866d8f4 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 9 Aug 2024 21:54:43 +0800 Subject: Download sse2neon.h automatically --- README.md | 3 --- indra/llcommon/CMakeLists.txt | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 156f86709d..ced2f1d4ce 100644 --- a/README.md +++ b/README.md @@ -109,9 +109,6 @@ $ lipo ../../../../../../3p-openssl/openssl/build/aarch64-apple-darwin`uname -r` $ lipo ../../../../../../3p-curl/curl/build/aarch64-apple-darwin`uname -r`/lib/.libs/libcurl.a libcurl.a -create -output libcurl.a $ lipo ../../../../../../3p-libndofdev/libndofdev/build/aarch64-apple-darwin`uname -r`/src/libndofdev.dylib libndofdev.dylib -create -output libndofdev.dylib $ cd ../../.. -$ cd /opt/local/include -$ sudo curl -OL https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h -$ cd - $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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 -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra $ make -j`sysctl -n hw.ncpu` diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 38fd05fae6..9811e705a0 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -294,6 +294,16 @@ target_link_libraries( target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +if (CMAKE_OSX_ARCHITECTURES MATCHES "(x86_64;)*arm64(;x86_64)*") + execute_process(COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/sse2neon) + execute_process(COMMAND curl + -OL + https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon + ) + target_include_directories(llcommon PUBLIC ${AUTOBUILD_INSTALL_DIR}/include/sse2neon) +endif () + if (USE_AUTOBUILD_3P OR USE_CONAN) add_dependencies(llcommon stage_third_party_libs) else () -- cgit v1.2.3 From c881801f6466c507b1aa5cac14647c4219f4735b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 9 Aug 2024 22:05:33 +0800 Subject: Set most CPACK variables before including CPack so that we don't have to run cmake twice just to pick up those variables. --- README.md | 12 +++----- indra/cmake/BuildVersion.cmake | 70 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ced2f1d4ce..404c8f7794 100644 --- a/README.md +++ b/README.md @@ -153,8 +153,7 @@ $ cd packages $ tar xf ~/Downloads/nanosvg-2022.09.27-linux-580337.tar.bz2 $ cd .. $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpng-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxmlrpc-epi-dev libxxhash-dev -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_PACKAGE_NAME:STRING=megapahit -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE:STRING=amd64 -DCPACK_DEBIAN_PACKAGE_DESCRIPTION:STRING="A fork of the Second Life viewer" -DCPACK_DEBIAN_PACKAGE_MAINTAINER:STRING=$USER@$HOST -DCPACK_DEBIAN_PACKAGE_SECTION:STRING=net -DCPACK_DEBIAN_PACKAGE_DEPENDES:STRING="libaprutil1, libboost-fiber1.74.0 | libboost-fiber1.81.0, libboost-program-options1.74.0 | libboost-program-options1.81.0, libboost-regex1.74.0 | libboost-regex1.81.0, libboost-thread1.74.0 | libboost-thread1.81.0, libcollada-dom2.5-dp0, libexpat1, libfltk1.3, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d (>= 0.18), libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0, vlc-plugin-base" ../../indra -$ cmake ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS:STRING="libaprutil1, libboost-fiber1.74.0 | libboost-fiber1.81.0, libboost-filesystem1.74.0 | libboost-filesystem1.81.0, libboost-program-options1.74.0 | libboost-program-options1.81.0, libboost-regex1.74.0 | libboost-regex1.81.0, libboost-thread1.74.0 | libboost-thread1.81.0, libcollada-dom2.5-dp0, libexpat1, libfltk1.3, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d (>= 0.18), libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0, vlc-plugin-base" ../../indra $ make -j`nproc` $ cpack -G DEB $ sudo apt install megapahit-`cat newview/viewer_version.txt`-Linux.deb @@ -165,8 +164,7 @@ $ megapahit ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_PACKAGE_NAME:STRING=megapahit -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE:STRING=amd64 -DCPACK_DEBIAN_PACKAGE_DESCRIPTION:STRING="A fork of the Second Life viewer" -DCPACK_DEBIAN_PACKAGE_MAINTAINER:STRING=$USER@$HOST -DCPACK_DEBIAN_PACKAGE_SECTION:STRING=net -DCPACK_DEBIAN_PACKAGE_DEPENDES:STRING="libaprutil1t64, libboost-fiber1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libcollada-dom2.5-dp0, libexpat1, libfltk2.0-0t64, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0t64, vlc-plugin-base" ../../indra -$ cmake ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS:STRING="libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libcollada-dom2.5-dp0, libexpat1, libfltk2.0-0t64, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0t64, vlc-plugin-base" ../../indra $ make -j`nproc` $ cpack -G DEB $ sudo apt install megapahit-`cat newview/viewer_version.txt`-Linux.deb @@ -190,8 +188,7 @@ $ sudo make install $ cd ../../../viewer/build/`uname -m`-linux-gnu $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel $ patchelf --remove-rpath packages/bin/release/dullahan_host -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_PACKAGE_NAME:STRING=megapahit -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCPACK_BINARY_RPM:BOOL=ON -DCPACK_RPM_PACKAGE_SUMMARY:STRING="A fork of the Second Life viewer" -DCPACK_RPM_PACKAGE_ARCHITECTURE:STRING=`uname -m` -DCPACK_RPM_PACKAGE_LICENSE:STRING=LGPL-2.1-only -DCPACK_RPM_PACKAGE_VENDOR:STRING=Megapahit -DCPACK_RPM_PACKAGE_URL:STRING=https://megapahit.net -DCPACK_RPM_PACKAGE_DESCRIPTION:STRING="An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems." -DCPACK_RPM_PACKAGE_REQUIRES:STRING="apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, collada-dom, expat, fltk, mesa-libGLU, hunspell, jsoncpp, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" ../../indra -$ cmake ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -222,8 +219,7 @@ $ sudo su - # portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/collada-dom x11-toolkits/fltk textproc/hunspell misc/meshoptimizer graphics/nanosvg graphics/openjpeg devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis net/xmlrpc-epi devel/xxhash # exit $ rm CMakeCache.txt -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_PACKAGE_NAME:STRING=megapahit -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCPACK_BINARY_FREEBSD:BOOL=ON -DCPACK_FREEBSD_PACKAGE_COMMENT:STRING="A fork of the Second Life viewer" -DCPACK_FREEBSD_PACKAGE_DESCRIPTION:STRING="An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems." -DCPACK_FREEBSD_PACKAGE_WWW:STRING=https://megapahit.net -DCPACK_FREEBSD_PACKAGE_LICENSE:STRING=LGPL21 -DCPACK_FREEBSD_PACKAGE_MAINTAINER:STRING=$USER@$HOST -DCPACK_FREEBSD_PACKAGE_ORIGIN:STRING=net/megapahit -DCPACK_FREEBSD_PACKAGE_DEPS:STRING="audio/freealut;devel/collada-dom;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;www/libnghttp2;graphics/openjpeg;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" ../../indra -$ cmake ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -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 diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 3b09cc4321..bb9e2a1272 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -55,10 +55,72 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}" "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\"" ) + if (PACKAGE) - include(CPack) - set(CPACK_PACKAGE_VERSION - ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} - CACHE STRING "Viewer major.minor.patch.revision versions.") + set(CPACK_PACKAGE_NAME ${VIEWER_BINARY_NAME} + CACHE STRING "Viewer binary name.") + set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} + CACHE STRING "Viewer major.minor.patch.revision versions.") + set(VIEWER_PACKAGE_COMMENT + "A fork of the Second Life viewer" + ) + set(VIEWER_PACKAGE_DESCRIPTION + "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems." + ) + set(VIEWER_PACKAGE_DOMAIN_NAME + ${VIEWER_BINARY_NAME}.net + ) + if (LINUX) + set(CPACK_BINARY_DEB ON CACHE BOOL "Able to package Debian DEB.") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE + amd64 + CACHE STRING "Debian package architecture.") + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "Debian package description.") + set(CPACK_DEBIAN_PACKAGE_MAINTAINER + $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "Debian package maintainer.") + set(CPACK_DEBIAN_PACKAGE_SECTION net + CACHE STRING "Debian package section.") + set(CPACK_BINARY_RPM ON CACHE BOOL "Able to package Fedora RPM.") + set(CPACK_RPM_PACKAGE_SUMMARY ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "RPM package summary.") + set(CPACK_RPM_PACKAGE_ARCHITECTURE + ${CMAKE_SYSTEM_PROCESSOR} + CACHE STRING "RPM package architecture.") + set(CPACK_RPM_PACKAGE_LICENSE LGPL-2.1-only + CACHE STRING "RPM package license.") + set(CPACK_RPM_PACKAGE_VENDOR ${VIEWER_CHANNEL} + CACHE STRING "RPM package vendor.") + set(CPACK_RPM_PACKAGE_URL + https://${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "RPM package URL.") + set(CPACK_RPM_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} + CACHE STRING "RPM package description.") + set(CPACK_RPM_PACKAGE_REQUIRES + "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, collada-dom, expat, fltk, mesa-libGLU, hunspell, jsoncpp, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" + CACHE STRING "RPM package requirements.") + elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD) + set(CPACK_BINARY_FREEBSD ON CACHE BOOL "Able to package FreeBSD PKG.") + set(CPACK_FREEBSD_PACKAGE_COMMENT ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "FreeBSD package comment.") + set(CPACK_FREEBSD_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} + CACHE STRING "FreeBSD package description.") + set(CPACK_FREEBSD_PACKAGE_WWW + https://${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "FreeBSD package WWW.") + set(CPACK_FREEBSD_PACKAGE_LICENSE LGPL21 + CACHE STRING "FreeBSD package license.") + set(CPACK_FREEBSD_PACKAGE_MAINTAINER + $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "FreeBSD package maintainer.") + set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} + CACHE STRING "FreeBSD package origin.") + set(CPACK_FREEBSD_PACKAGE_DEPS + "audio/freealut;devel/collada-dom;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;www/libnghttp2;graphics/openjpeg;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" + CACHE STRING "FreeBSD package dependencies.") + endif () + include(CPack) endif (PACKAGE) + endif (NOT DEFINED VIEWER_SHORT_VERSION) -- cgit v1.2.3 From 07004adb7e52b7ead801251b13e8589ad3971f6c Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 07:30:46 +0800 Subject: Fix 7c716d6d516f99628655352a0e679455263924e2 logics --- indra/cmake/CEFPlugin.cmake | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index fc7929a226..6c52963a51 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -5,21 +5,23 @@ include(Prebuilt) include_guard() add_library( ll::cef INTERFACE IMPORTED ) -if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0)) - execute_process(COMMAND curl - -O - https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 - WORKING_DIRECTORY $ENV{HOME}/Downloads - ) - execute_process(COMMAND tar - xf - $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} - RESULT_VARIABLE dullahan_installed - ) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) + execute_process(COMMAND curl + -O + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + WORKING_DIRECTORY $ENV{HOME}/Downloads + ) + execute_process(COMMAND tar + xf + $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE dullahan_installed + ) + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) else () use_prebuilt_binary(dullahan) -endif () +endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) -- cgit v1.2.3 From 649865d408846d1559e736abf1be5d74207e6313 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 18:54:19 +0800 Subject: Automatic Meshoptimizer download, build & install on macOS and Fedora. --- README.md | 23 ++-------------- indra/cmake/Meshoptimizer.cmake | 60 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 56 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 404c8f7794..9ae3e6d52e 100644 --- a/README.md +++ b/README.md @@ -37,22 +37,15 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz -o meshoptimizer-0.21.tar.gz -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 $ cd - $ cd .. -$ tar xf ~/Downloads/meshoptimizer-0.21.tar.gz $ tar xf ~/Downloads/openjpeg-2.5.2.tar.gz $ tar xf ~/Downloads/xmlrpc-epi-0.54.2.tar.bz2 $ git clone https://github.com/secondlife/3p-openssl $ git clone https://github.com/secondlife/3p-curl $ git clone https://github.com/secondlife/3p-libndofdev -$ cd meshoptimizer-0.21 -$ mkdir -p build/universal-apple-darwin`uname -r` -$ cd build/universal-apple-darwin`uname -r` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5 -DMESHOPT_BUILD_SHARED_LIBS:BOOL=ON ../.. -$ make -j`sysctl -n hw.ncpu` -$ sudo make install -$ cd ../../../openjpeg-2.5.2 +$ cd openjpeg-2.5.2 $ sudo cp src/lib/openjp2/cio.h src/lib/openjp2/event.h /opt/local/include/openjpeg-2.5/ $ mkdir -p build/`uname -m`-apple-darwin`uname -r` $ cd build/`uname -m`-apple-darwin`uname -r` @@ -174,18 +167,6 @@ $ megapahit #### Fedora ``` -$ cd ~/Downloads -$ curl -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz -o meshoptimizer-0.21.tar.gz -$ cd - -$ cd ../../.. -$ tar xf ~/Downloads/meshoptimizer-0.21.tar.gz -$ cd meshoptimizer-0.21 -$ mkdir -p build/`uname -m`-linux-gnu -$ cd build/`uname -m`-linux-gnu -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release ../.. -$ make -j`nproc` -$ sudo make install -$ cd ../../../viewer/build/`uname -m`-linux-gnu $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel $ patchelf --remove-rpath packages/bin/release/dullahan_host $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../../indra diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index a1cf81be80..07ea3120a7 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -6,14 +6,61 @@ include(Prebuilt) include_guard() add_library( ll::meshoptimizer INTERFACE IMPORTED ) -if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) - target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${CMAKE_SYSROOT}/usr/local/include ) - target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) - return () -endif () - +if (NOT USESYSTEMLIBS) use_system_binary(meshoptimizer) +else (NOT USESYSTEMLIBS) + cmake_host_system_information(RESULT MAKE_JOBS QUERY NUMBER_OF_LOGICAL_CORES) + if (LINUX) + cmake_host_system_information(RESULT LINUX_DISTRO QUERY DISTRIB_ID) + endif (LINUX) + if (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) + find_package(meshoptimizer) + endif (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) +endif (NOT USESYSTEMLIBS) + +if (${LINUX_DISTRO} MATCHES fedora 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) + execute_process( + COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer + COMMAND curl + -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz + -o meshoptimizer-0.21.tar.gz + WORKING_DIRECTORY $ENV{HOME}/Downloads + ) + execute_process( + COMMAND tar xf $ENV{HOME}/Downloads/meshoptimizer-0.21.tar.gz + WORKING_DIRECTORY /tmp + ) + execute_process( + COMMAND cmake + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + . + WORKING_DIRECTORY /tmp/meshoptimizer-0.21 + ) + if (DARWIN) + execute_process( + COMMAND cmake + -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 + -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 + . + WORKING_DIRECTORY /tmp/meshoptimizer-0.21 + ) + endif (DARWIN) + execute_process( + COMMAND make -j${MAKE_JOBS} + WORKING_DIRECTORY /tmp/meshoptimizer-0.21 + ) + execute_process( + COMMAND cp /tmp/meshoptimizer-0.21/src/meshoptimizer.h ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer/ + COMMAND cp /tmp/meshoptimizer-0.21/libmeshoptimizer.a ${AUTOBUILD_INSTALL_DIR}/lib/release/ + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE meshoptimizer_installed + ) + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) + else (USESYSTEMLIBS) use_prebuilt_binary(meshoptimizer) + endif (USESYSTEMLIBS) if (WINDOWS) target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) @@ -24,3 +71,4 @@ elseif (DARWIN) endif (WINDOWS) target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer) +endif (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) -- cgit v1.2.3 From 15181f40926e59465f50291f5b7b9323fe383749 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 20:14:48 +0800 Subject: No Meshoptimizer macOS install name change or link since the app links to Meshoptimizer statically now on macOS. --- indra/media_plugins/cef/CMakeLists.txt | 1 - indra/media_plugins/libvlc/CMakeLists.txt | 1 - indra/newview/FixBundle.cmake.in | 5 ----- indra/newview/FixPackage.cmake.in | 5 ----- 4 files changed, 12 deletions(-) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 39353401e9..7f44270fe7 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -107,7 +107,6 @@ if (DARWIN) -change "/opt/local/lib/libpng16.16.dylib" "@loader_path/../../Frameworks/libpng16.16.dylib" -change "/opt/local/lib/libjpeg.8.dylib" "@loader_path/../../Frameworks/libjpeg.8.dylib" -change "/opt/local/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib" - -change "@rpath/libmeshoptimizer.dylib" "@loader_path/../../Frameworks/libmeshoptimizer.dylib" -change "/opt/local/lib/libaprutil-1.0.dylib" "@loader_path/../../Frameworks/libaprutil-1.0.dylib" -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib" -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib" diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 3c499b0cbd..1710d18f4d 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -53,7 +53,6 @@ if (DARWIN) -change "/opt/local/lib/libpng16.16.dylib" "@loader_path/../../Frameworks/libpng16.16.dylib" -change "/opt/local/lib/libjpeg.8.dylib" "@loader_path/../../Frameworks/libjpeg.8.dylib" -change "/opt/local/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib" - -change "@rpath/libmeshoptimizer.dylib" "@loader_path/../../Frameworks/libmeshoptimizer.dylib" -change "/opt/local/lib/libaprutil-1.0.dylib" "@loader_path/../../Frameworks/libaprutil-1.0.dylib" -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib" -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib" diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index 6d343680d9..b0d23c712c 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -31,11 +31,6 @@ file(CREATE_LINK "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjpeg.8.dylib" SYMBOLIC ) -file(CREATE_LINK - "../../../../Frameworks/libmeshoptimizer.dylib" - "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libmeshoptimizer.dylib" - SYMBOLIC - ) file(CREATE_LINK "../../../../Frameworks/libaprutil-1.0.dylib" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libaprutil-1.0.dylib" diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in index 167519edd3..fc8cae1d19 100644 --- a/indra/newview/FixPackage.cmake.in +++ b/indra/newview/FixPackage.cmake.in @@ -31,11 +31,6 @@ file(CREATE_LINK "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjpeg.8.dylib" SYMBOLIC ) -file(CREATE_LINK - "../../../../Frameworks/libmeshoptimizer.dylib" - "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libmeshoptimizer.dylib" - SYMBOLIC - ) file(CREATE_LINK "../../../../Frameworks/libaprutil-1.0.dylib" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libaprutil-1.0.dylib" -- cgit v1.2.3 From 0b83ae82b72bf69310546f7f7fada9cb1d072564 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 20:20:09 +0800 Subject: Automatic dullahan_host runpath removal on Fedora --- README.md | 1 - indra/cmake/CEFPlugin.cmake | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ae3e6d52e..f3031ff7bd 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,6 @@ $ megapahit ``` $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel -$ patchelf --remove-rpath packages/bin/release/dullahan_host $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 6c52963a51..655d924160 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -19,8 +19,17 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) RESULT_VARIABLE dullahan_installed ) endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) -else () +else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) + if (LINUX) + cmake_host_system_information(RESULT LINUX_DISTRO QUERY DISTRIB_ID) + if (${LINUX_DISTRO} MATCHES fedora) + execute_process( + COMMAND patchelf --remove-rpath bin/release/dullahan_host + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + ) + endif (${LINUX_DISTRO} MATCHES fedora) + endif (LINUX) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) -- cgit v1.2.3 From 72c5668d54dd7f0fd43ce084cee84ea07662c4ae Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 21:00:29 +0800 Subject: Make sure APP_SHARE_DIR is valued in llfilesystem otherwise the app would crash on GNU/Linux or BSD for missing the share directory prefix, unless cmake is run twice like before just so APP_SHARE_DIR is picked up but we don't want to have to run it twice. --- indra/llfilesystem/CMakeLists.txt | 1 + indra/newview/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 7db1971460..22c30c55d9 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,6 +4,7 @@ project(llfilesystem) include(00-Common) include(LLCommon) +include(UnixInstall) set(llfilesystem_SOURCE_FILES lldir.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1bf44abb95..49a52c1e0f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -65,7 +65,6 @@ if (ENABLE_MEDIA_PLUGINS) include(CEFPlugin) endif (DARWIN OR LINUX) endif (ENABLE_MEDIA_PLUGINS) -include(UnixInstall) if (NOT (USESYSTEMLIBS OR HAVOK_TPV)) # When using HAVOK_TPV, the library is precompiled, so no need for this -- cgit v1.2.3 From b3e60cdc77bc0cdf221416a4d0669df8f5954245 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 21:05:09 +0800 Subject: Fix Meshoptimizer CMAKE_OSX_ARCHITECTURES value It is decided that on x86-64, it's compiled too instead of using LL's (old) prebuilt libmeshoptimizer.a. --- indra/cmake/Meshoptimizer.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 07ea3120a7..07bf0a71da 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -41,7 +41,7 @@ if (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) if (DARWIN) execute_process( COMMAND cmake - -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 + -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 . WORKING_DIRECTORY /tmp/meshoptimizer-0.21 -- cgit v1.2.3 From a52e23c7b3138caddec0267045c7fa9fa5957b9e Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 10 Aug 2024 22:19:29 +0800 Subject: Bring back Meshoptimizer linking to FBSD & Debian and Ubuntu. find_package(meshoptimizer) didn't imply its target_link_libraries. --- indra/cmake/Meshoptimizer.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 07bf0a71da..15c6435af9 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -15,6 +15,7 @@ else (NOT USESYSTEMLIBS) endif (LINUX) if (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) find_package(meshoptimizer) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) endif (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) endif (NOT USESYSTEMLIBS) -- cgit v1.2.3 From f7561713057209fd9aa259351166129d08028252 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 11 Aug 2024 14:33:58 +0800 Subject: Linux distro & logical cores queries are shared by moving them to Variables.cmake so they can be reused throughout all CMake files. --- indra/cmake/CEFPlugin.cmake | 1 - indra/cmake/Meshoptimizer.cmake | 4 ---- indra/cmake/Variables.cmake | 3 +++ 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 655d924160..8dda7db563 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -22,7 +22,6 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) if (LINUX) - cmake_host_system_information(RESULT LINUX_DISTRO QUERY DISTRIB_ID) if (${LINUX_DISTRO} MATCHES fedora) execute_process( COMMAND patchelf --remove-rpath bin/release/dullahan_host diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 15c6435af9..e926d8118c 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -9,10 +9,6 @@ add_library( ll::meshoptimizer INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(meshoptimizer) else (NOT USESYSTEMLIBS) - cmake_host_system_information(RESULT MAKE_JOBS QUERY NUMBER_OF_LOGICAL_CORES) - if (LINUX) - cmake_host_system_information(RESULT LINUX_DISTRO QUERY DISTRIB_ID) - endif (LINUX) if (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) find_package(meshoptimizer) target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index ab8add8af8..59368e1177 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -101,12 +101,15 @@ else (ADDRESS_SIZE EQUAL 32) endif() endif (ADDRESS_SIZE EQUAL 32) +cmake_host_system_information(RESULT MAKE_JOBS QUERY NUMBER_OF_LOGICAL_CORES) + if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(WINDOWS ON BOOL FORCE) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) + cmake_host_system_information(RESULT LINUX_DISTRO QUERY DISTRIB_ID) if (ADDRESS_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) -- cgit v1.2.3 From 15a1ca3695cd5886f0296567c10f9d62c30729b2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 11 Aug 2024 14:35:38 +0800 Subject: Rearrange CPack settings & contributors generation where they belong in newview/CMakeLists.txt. --- indra/cmake/BuildVersion.cmake | 68 ----------------- indra/newview/CMakeLists.txt | 169 ++++++++++++++++++++++++++++------------- 2 files changed, 118 insertions(+), 119 deletions(-) diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index bb9e2a1272..aa151bafc8 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -55,72 +55,4 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}" "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\"" ) - -if (PACKAGE) - set(CPACK_PACKAGE_NAME ${VIEWER_BINARY_NAME} - CACHE STRING "Viewer binary name.") - set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} - CACHE STRING "Viewer major.minor.patch.revision versions.") - set(VIEWER_PACKAGE_COMMENT - "A fork of the Second Life viewer" - ) - set(VIEWER_PACKAGE_DESCRIPTION - "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems." - ) - set(VIEWER_PACKAGE_DOMAIN_NAME - ${VIEWER_BINARY_NAME}.net - ) - if (LINUX) - set(CPACK_BINARY_DEB ON CACHE BOOL "Able to package Debian DEB.") - set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE - amd64 - CACHE STRING "Debian package architecture.") - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_COMMENT} - CACHE STRING "Debian package description.") - set(CPACK_DEBIAN_PACKAGE_MAINTAINER - $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} - CACHE STRING "Debian package maintainer.") - set(CPACK_DEBIAN_PACKAGE_SECTION net - CACHE STRING "Debian package section.") - set(CPACK_BINARY_RPM ON CACHE BOOL "Able to package Fedora RPM.") - set(CPACK_RPM_PACKAGE_SUMMARY ${VIEWER_PACKAGE_COMMENT} - CACHE STRING "RPM package summary.") - set(CPACK_RPM_PACKAGE_ARCHITECTURE - ${CMAKE_SYSTEM_PROCESSOR} - CACHE STRING "RPM package architecture.") - set(CPACK_RPM_PACKAGE_LICENSE LGPL-2.1-only - CACHE STRING "RPM package license.") - set(CPACK_RPM_PACKAGE_VENDOR ${VIEWER_CHANNEL} - CACHE STRING "RPM package vendor.") - set(CPACK_RPM_PACKAGE_URL - https://${VIEWER_PACKAGE_DOMAIN_NAME} - CACHE STRING "RPM package URL.") - set(CPACK_RPM_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} - CACHE STRING "RPM package description.") - set(CPACK_RPM_PACKAGE_REQUIRES - "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, collada-dom, expat, fltk, mesa-libGLU, hunspell, jsoncpp, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" - CACHE STRING "RPM package requirements.") - elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD) - set(CPACK_BINARY_FREEBSD ON CACHE BOOL "Able to package FreeBSD PKG.") - set(CPACK_FREEBSD_PACKAGE_COMMENT ${VIEWER_PACKAGE_COMMENT} - CACHE STRING "FreeBSD package comment.") - set(CPACK_FREEBSD_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} - CACHE STRING "FreeBSD package description.") - set(CPACK_FREEBSD_PACKAGE_WWW - https://${VIEWER_PACKAGE_DOMAIN_NAME} - CACHE STRING "FreeBSD package WWW.") - set(CPACK_FREEBSD_PACKAGE_LICENSE LGPL21 - CACHE STRING "FreeBSD package license.") - set(CPACK_FREEBSD_PACKAGE_MAINTAINER - $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} - CACHE STRING "FreeBSD package maintainer.") - set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} - CACHE STRING "FreeBSD package origin.") - set(CPACK_FREEBSD_PACKAGE_DEPS - "audio/freealut;devel/collada-dom;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;www/libnghttp2;graphics/openjpeg;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" - CACHE STRING "FreeBSD package dependencies.") - endif () - include(CPack) -endif (PACKAGE) - endif (NOT DEFINED VIEWER_SHORT_VERSION) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 49a52c1e0f..1dfadad584 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2040,57 +2040,80 @@ foreach(elem ${country_codes}) configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY) endforeach() -if (USESYSTEMLIBS) - - if (LINUX) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sort - ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND paste - ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - COMMAND ${CMAKE_SYSROOT}/usr/bin/sed - ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - ) - else (LINUX) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND sed - ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sed - ARGS -i '' -e '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND sort - ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt - COMMAND paste - ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - COMMAND sed - ARGS -i '' -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt - ) - endif (LINUX) - -else (USESYSTEMLIBS) +if (PACKAGE AND USESYSTEMLIBS) + set(CPACK_PACKAGE_NAME ${VIEWER_BINARY_NAME} + CACHE STRING "Viewer binary name.") + set(CPACK_PACKAGE_VERSION ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} + CACHE STRING "Viewer major.minor.patch.revision versions.") + set(VIEWER_PACKAGE_COMMENT + "A fork of the Second Life viewer" + ) + set(VIEWER_PACKAGE_DESCRIPTION + "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems." + ) + set(VIEWER_PACKAGE_DOMAIN_NAME + ${VIEWER_BINARY_NAME}.net + ) +endif (PACKAGE AND USESYSTEMLIBS) if (LINUX) + if (USESYSTEMLIBS) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sort + ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND paste + ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + COMMAND ${CMAKE_SYSROOT}/usr/bin/sed + ARGS -i ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + ) + if (PACKAGE) + if (${LINUX_DISTRO} MATCHES debian OR ${LINUX_DISTRO} MATCHES ubuntu) + set(CPACK_BINARY_DEB ON CACHE BOOL "Able to package Debian DEB.") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE + amd64 + CACHE STRING "Debian package architecture.") + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "Debian package description.") + set(CPACK_DEBIAN_PACKAGE_MAINTAINER + $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "Debian package maintainer.") + set(CPACK_DEBIAN_PACKAGE_SECTION net + CACHE STRING "Debian package section.") + elseif (${LINUX_DISTRO} MATCHES fedora) + set(CPACK_BINARY_RPM ON CACHE BOOL "Able to package Fedora RPM.") + set(CPACK_RPM_PACKAGE_SUMMARY ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "RPM package summary.") + set(CPACK_RPM_PACKAGE_ARCHITECTURE + ${CMAKE_SYSTEM_PROCESSOR} + CACHE STRING "RPM package architecture.") + set(CPACK_RPM_PACKAGE_LICENSE LGPL-2.1-only + CACHE STRING "RPM package license.") + set(CPACK_RPM_PACKAGE_VENDOR ${VIEWER_CHANNEL} + CACHE STRING "RPM package vendor.") + set(CPACK_RPM_PACKAGE_URL + https://${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "RPM package URL.") + set(CPACK_RPM_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} + CACHE STRING "RPM package description.") + set(CPACK_RPM_PACKAGE_REQUIRES + "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, collada-dom, expat, fltk, mesa-libGLU, hunspell, jsoncpp, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" + CACHE STRING "RPM package requirements.") + endif (${LINUX_DISTRO} MATCHES debian OR ${LINUX_DISTRO} MATCHES ubuntu) + endif (PACKAGE) + else (USESYSTEMLIBS) set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) # These are the generated targets that are copied to package/ @@ -2165,10 +2188,51 @@ if (LINUX) add_dependencies(llpackage copy_l_viewer_manifest) check_message_template(llpackage) endif (PACKAGE) + endif (USESYSTEMLIBS) +elseif (USESYSTEMLIBS) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND sed + ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sed + ARGS -i '' -e '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND sort + ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt + COMMAND paste + ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + COMMAND sed + ARGS -i '' -e 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt + ) + if (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) + set(CPACK_BINARY_FREEBSD ON CACHE BOOL "Able to package FreeBSD PKG.") + set(CPACK_FREEBSD_PACKAGE_COMMENT ${VIEWER_PACKAGE_COMMENT} + CACHE STRING "FreeBSD package comment.") + set(CPACK_FREEBSD_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} + CACHE STRING "FreeBSD package description.") + set(CPACK_FREEBSD_PACKAGE_WWW + https://${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "FreeBSD package WWW.") + set(CPACK_FREEBSD_PACKAGE_LICENSE LGPL21 + CACHE STRING "FreeBSD package license.") + set(CPACK_FREEBSD_PACKAGE_MAINTAINER + $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} + CACHE STRING "FreeBSD package maintainer.") + set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} + CACHE STRING "FreeBSD package origin.") + set(CPACK_FREEBSD_PACKAGE_DEPS + "audio/freealut;devel/collada-dom;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;www/libnghttp2;graphics/openjpeg;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" + CACHE STRING "FreeBSD package dependencies.") + endif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) endif (LINUX) -endif (USESYSTEMLIBS) - if (DARWIN) # These all get set with PROPERTIES. It's not that the property names are # magically known to CMake -- it's that these names are referenced in the @@ -2312,6 +2376,9 @@ endif (DARWIN) if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) +if (PACKAGE AND USESYSTEMLIBS) + include(CPack) +endif (PACKAGE AND USESYSTEMLIBS) # Note that the conventional VIEWER_SYMBOL_FILE is set by ../../build.sh if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIEWER_SYMBOL_FILE) -- cgit v1.2.3 From 1b2d37285d4ae85bb10dd543ff2a40ea3e5419ee Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 11 Aug 2024 15:27:47 +0800 Subject: CPACK_DEBIAN_PACKAGE_DEPENDS are in CMakeLists now and can be differentiated across different distros, even though there are only stable/LTS Debian and Ubuntu for now. --- README.md | 4 ++-- indra/newview/CMakeLists.txt | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3031ff7bd..f7811ee9c1 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ $ cd packages $ tar xf ~/Downloads/nanosvg-2022.09.27-linux-580337.tar.bz2 $ cd .. $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpng-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxmlrpc-epi-dev libxxhash-dev -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS:STRING="libaprutil1, libboost-fiber1.74.0 | libboost-fiber1.81.0, libboost-filesystem1.74.0 | libboost-filesystem1.81.0, libboost-program-options1.74.0 | libboost-program-options1.81.0, libboost-regex1.74.0 | libboost-regex1.81.0, libboost-thread1.74.0 | libboost-thread1.81.0, libcollada-dom2.5-dp0, libexpat1, libfltk1.3, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d (>= 0.18), libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0, vlc-plugin-base" ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -157,7 +157,7 @@ $ megapahit ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS:STRING="libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libcollada-dom2.5-dp0, libexpat1, libfltk2.0-0t64, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0t64, vlc-plugin-base" ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1dfadad584..2409fb1e18 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2092,6 +2092,15 @@ if (LINUX) CACHE STRING "Debian package maintainer.") set(CPACK_DEBIAN_PACKAGE_SECTION net CACHE STRING "Debian package section.") + if (${LINUX_DISTRO} MATCHES debian) + set(CPACK_DEBIAN_PACKAGE_DEPENDS + "libaprutil1, libboost-fiber1.74.0 | libboost-fiber1.81.0, libboost-filesystem1.74.0 | libboost-filesystem1.81.0, libboost-program-options1.74.0 | libboost-program-options1.81.0, libboost-regex1.74.0 | libboost-regex1.81.0, libboost-thread1.74.0 | libboost-thread1.81.0, libcollada-dom2.5-dp0, libexpat1, libfltk1.3, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d (>= 0.18), libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0, vlc-plugin-base" + CACHE STRING "Debian package dependencies.") + elseif (${LINUX_DISTRO} MATCHES ubuntu) + set(CPACK_DEBIAN_PACKAGE_DEPENDS + "libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libcollada-dom2.5-dp0, libexpat1, libfltk2.0-0t64, libglu1-mesa, libhunspell-1.7-0, libjsoncpp25, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0t64, vlc-plugin-base" + CACHE STRING "Debian package dependencies.") + endif (${LINUX_DISTRO} MATCHES debian) elseif (${LINUX_DISTRO} MATCHES fedora) set(CPACK_BINARY_RPM ON CACHE BOOL "Able to package Fedora RPM.") set(CPACK_RPM_PACKAGE_SUMMARY ${VIEWER_PACKAGE_COMMENT} -- cgit v1.2.3 From 1685e1590f7cb6e03d697f7abd1570f51dd37778 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 11 Aug 2024 15:49:22 +0800 Subject: Minimise UnixInstall.cmake difference from SLv's The variables set in this file are used only in llfilesystem/CMakeLists.txt, and only used within a Linux (& FreeBSD) section, which then later used in llfilesystem/lldir_linux.cpp, so Darwin doesn't need these variables set specifically for it. --- README.md | 6 +-- indra/cmake/UnixInstall.cmake | 92 ++++++++++++++------------------------- indra/llfilesystem/CMakeLists.txt | 11 ++--- 3 files changed, 41 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index f7811ee9c1..f46e97a74c 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ $ cd packages $ tar xf ~/Downloads/nanosvg-2022.09.27-linux-580337.tar.bz2 $ cd .. $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpng-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxmlrpc-epi-dev libxxhash-dev -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -157,7 +157,7 @@ $ megapahit ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -168,7 +168,7 @@ $ megapahit ``` $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index 59620b60b4..021700b374 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -6,64 +6,36 @@ set(INSTALL OFF CACHE BOOL "Generate install target.") if (INSTALL) - - if (DARWIN) - - set(INSTALL_PREFIX - ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents - CACHE PATH - "Top-level installation directory.") - - set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/Resources - CACHE PATH - "Installation directory for read-only shared files.") - - set(INSTALL_SHARE_DIR ${INSTALL_LIBRARY_DIR} CACHE PATH - "Installation directory for read-only shared files.") - - set(APP_BINARY_DIR ${INSTALL_PREFIX}/MacOS - CACHE PATH - "Installation directory for binaries.") - - set(APP_SHARE_DIR ${INSTALL_SHARE_DIR} - CACHE PATH - "Installation directory for read-only data files.") - - set(APP_LIBEXEC_DIR ${INSTALL_LIBRARY_DIR} - CACHE PATH - "Installation directory for non-manual executables.") - - else (DARWIN) - - set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH - "Top-level installation directory.") - - if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) - set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) - set(_LIB lib64) - else () - set(_LIB lib) - endif () - - set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH - "Installation directory for read-only shared files.") - - set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH - "Installation directory for read-only shared files.") - - set(APP_BINARY_DIR ${INSTALL_PREFIX}/bin - CACHE PATH - "Installation directory for binaries.") - - set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME} - CACHE PATH - "Installation directory for read-only data files.") - - set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME} - CACHE PATH - "Installation directory for non-manual executables.") - - endif (DARWIN) - + if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) + set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH + "Top-level installation directory.") + else (CMAKE_SYSTEM_NAME MATCHES FreeBSD) + set(INSTALL_PREFIX /usr CACHE PATH + "Top-level installation directory.") + endif (CMAKE_SYSTEM_NAME MATCHES FreeBSD) + + if (EXISTS /lib64) + set(_LIB lib64) + elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) + set(_LIB lib/${ARCH}-linux-gnu) + else (EXISTS /lib64) + set(_LIB lib) + endif (EXISTS /lib64) + + set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH + "Installation directory for read-only shared files.") + + set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH + "Installation directory for read-only shared files.") + + set(APP_BINARY_DIR ${INSTALL_LIBRARY_DIR}/secondlife-${viewer_VERSION} + CACHE PATH + "Installation directory for binaries.") + + set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME} + CACHE PATH + "Installation directory for read-only data files.") + set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME} + CACHE PATH + "Installation directory for non-manual executables.") endif (INSTALL) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 22c30c55d9..8d85f739b3 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,7 +4,9 @@ project(llfilesystem) include(00-Common) include(LLCommon) -include(UnixInstall) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) + include(UnixInstall) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(llfilesystem_SOURCE_FILES lldir.cpp @@ -31,17 +33,17 @@ if (DARWIN) LIST(APPEND llfilesystem_HEADER_FILES lldir_mac.h) endif (DARWIN) -if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) LIST(APPEND llfilesystem_SOURCE_FILES lldir_linux.cpp) LIST(APPEND llfilesystem_HEADER_FILES lldir_linux.h) if (INSTALL) set_source_files_properties(lldir_linux.cpp PROPERTIES COMPILE_FLAGS - "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\" -DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\"" + "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\" -DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\"" ) endif (INSTALL) -endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) if (WINDOWS) LIST(APPEND llfilesystem_SOURCE_FILES lldir_win32.cpp) @@ -56,7 +58,6 @@ target_link_libraries(llfilesystem llcommon ) target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) - include(LibraryInstall) # Add tests -- cgit v1.2.3 From 30a8368fd6134c239ad61f4ce2a713ba33fa6924 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 11 Aug 2024 20:53:20 +0800 Subject: Dullahan x86-64 built with minimum macOS 10.15 LL's build seems to have a minimum macOS of 13.3. --- indra/cmake/CEFPlugin.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 8dda7db563..921a6e8032 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -19,6 +19,20 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) RESULT_VARIABLE dullahan_installed ) endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) +elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) + execute_process(COMMAND curl + -O + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + WORKING_DIRECTORY $ENV{HOME}/Downloads + ) + execute_process(COMMAND tar + xf + $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE dullahan_installed + ) + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) if (LINUX) -- cgit v1.2.3 From 2caff153c35274de15276b3cae10c7df54dacfc2 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 13:08:38 +0800 Subject: Automatic OpenJPEG download, configure & install --- README.md | 28 +++++-------------------- indra/cmake/OpenJPEG.cmake | 41 ++++++++++++++++++++++++++++++++++--- indra/llimagej2coj/llimagej2coj.cpp | 6 ------ indra/newview/CMakeLists.txt | 2 +- 4 files changed, 44 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index f46e97a74c..76685d76b4 100644 --- a/README.md +++ b/README.md @@ -37,21 +37,14 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 $ cd - $ cd .. -$ tar xf ~/Downloads/openjpeg-2.5.2.tar.gz $ tar xf ~/Downloads/xmlrpc-epi-0.54.2.tar.bz2 $ git clone https://github.com/secondlife/3p-openssl $ git clone https://github.com/secondlife/3p-curl $ git clone https://github.com/secondlife/3p-libndofdev -$ cd openjpeg-2.5.2 -$ sudo cp src/lib/openjp2/cio.h src/lib/openjp2/event.h /opt/local/include/openjpeg-2.5/ -$ mkdir -p build/`uname -m`-apple-darwin`uname -r` -$ cd build/`uname -m`-apple-darwin`uname -r` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release ../.. -$ sudo cp src/lib/openjp2/opj_config_private.h /opt/local/include/openjpeg-2.5/ -$ cd ../../../xmlrpc-epi-0.54.2 +$ cd xmlrpc-epi-0.54.2 $ export CPPFLAGS="$CPPFLAGS -I$PWD/src" $ rm -f config.sub missing $ autoreconf -is @@ -114,24 +107,13 @@ $ open newview/Megapahit.app ``` $ mkdir -p build/`uname -m`-linux-gnu/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/3p-open-libndofdev/releases/download/v1.14-r2/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst -OL https://github.com/uclouvain/openjpeg/releases/download/v2.5.2/openjpeg-v2.5.2-linux-x86_64.tar.gz -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz -o openjpeg-2.5.2.tar.gz -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/3p-open-libndofdev/releases/download/v1.14-r2/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst $ cd - $ cd build/`uname -m`-linux-gnu/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-linux64-513145c.tar.zst $ tar xf ~/Downloads/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst $ tar xf ~/Downloads/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst -$ cd ../../../.. -$ tar xf ~/Downloads/openjpeg-v2.5.2-linux-x86_64.tar.gz -$ cp -R openjpeg-v2.5.2-linux-x86_64/include/openjpeg-2.5 viewer/build/`uname -m`-linux-gnu/packages/include/openjpeg -$ cp openjpeg-v2.5.2-linux-x86_64/lib/libopenjp2.a viewer/build/`uname -m`-linux-gnu/packages/lib/release/ -$ tar xf ~/Downloads/openjpeg-2.5.2.tar.gz -$ cd openjpeg-2.5.2 -$ cp src/lib/openjp2/cio.h src/lib/openjp2/event.h ../viewer/build/`uname -m`-linux-gnu/packages/include/openjpeg/ -$ mkdir -p build/`uname -m`-linux-gnu -$ cd build/`uname -m`-linux-gnu -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release ../.. -$ cp src/lib/openjp2/opj_config_private.h ../../../viewer/build/`uname -m`-linux-gnu/packages/include/openjpeg/ -$ cd ../../../viewer/build/`uname -m`-linux-gnu +$ cd .. $ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" $ rm CMakeCache.txt ``` @@ -167,7 +149,7 @@ $ megapahit #### Fedora ``` -$ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel +$ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel $ 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 -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 diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 6de03113ed..778cf62e29 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -6,15 +6,50 @@ add_library( ll::openjpeg INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(openjpeg) -use_prebuilt_binary(openjpeg) -elseif (NOT LINUX) +elseif (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) include(FindPkgConfig) pkg_check_modules(Openjpeg REQUIRED libopenjp2) target_include_directories(ll::openjpeg SYSTEM INTERFACE ${Openjpeg_INCLUDE_DIRS}) target_link_directories(ll::openjpeg INTERFACE ${Openjpeg_LIBRARY_DIRS}) target_link_libraries(ll::openjpeg INTERFACE ${Openjpeg_LIBRARIES}) - return () endif (NOT USESYSTEMLIBS) +if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) + execute_process( + COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/openjpeg-2.5 + COMMAND curl + -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz + -o openjpeg-2.5.2.tar.gz + WORKING_DIRECTORY $ENV{HOME}/Downloads + ) + execute_process( + COMMAND tar xf $ENV{HOME}/Downloads/openjpeg-2.5.2.tar.gz + WORKING_DIRECTORY /tmp + ) + execute_process( + COMMAND cmake + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + . + WORKING_DIRECTORY /tmp/openjpeg-2.5.2 + ) + execute_process( + COMMAND cp + /tmp/openjpeg-2.5.2/src/lib/openjp2/cio.h + /tmp/openjpeg-2.5.2/src/lib/openjp2/event.h + /tmp/openjpeg-2.5.2/src/lib/openjp2/opj_config_private.h + ${AUTOBUILD_INSTALL_DIR}/include/openjpeg-2.5/ + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE openjpeg_installed + ) + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) +else (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +use_prebuilt_binary(openjpeg) + execute_process(COMMAND mv + openjpeg + openjpeg-2.5 + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include + ) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) +endif (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index b5f1df5507..5b03f76d32 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -28,15 +28,9 @@ #include "llimagej2coj.h" // this is defined so that we get static linking. -#if LL_LINUX || !LL_USESYSTEMLIBS -#include "openjpeg/openjpeg.h" -#include "openjpeg/event.h" -#include "openjpeg/cio.h" -#else #include #include #include -#endif #define MAX_ENCODED_DISCARD_LEVELS 5 diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2409fb1e18..bc597fb69e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2118,7 +2118,7 @@ if (LINUX) set(CPACK_RPM_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} CACHE STRING "RPM package description.") set(CPACK_RPM_PACKAGE_REQUIRES - "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, collada-dom, expat, fltk, mesa-libGLU, hunspell, jsoncpp, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" + "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, collada-dom, expat, fltk, mesa-libGLU, hunspell, jsoncpp, libnghttp2, openjpeg2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" CACHE STRING "RPM package requirements.") endif (${LINUX_DISTRO} MATCHES debian OR ${LINUX_DISTRO} MATCHES ubuntu) endif (PACKAGE) -- cgit v1.2.3 From 5c34a90bea4506ac965817596378a97ae5895a64 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 14:02:36 +0800 Subject: Download VLC dmg automatically and building only for one architecture at a time is the one supported now. --- README.md | 2 +- indra/cmake/LibVLCPlugin.cmake | 31 ++++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 76685d76b4..481349cc07 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 $ cd - $ cd .. $ tar xf ~/Downloads/xmlrpc-epi-0.54.2.tar.bz2 diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index e2ecb8b248..c6f1423322 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -6,15 +6,34 @@ include_guard() add_library( ll::libvlc INTERFACE IMPORTED ) if (USESYSTEMLIBS) - if (DARWIN) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) + execute_process(COMMAND curl + -L + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg + -o + $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE vlc_installed + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg) - elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) + else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) + execute_process(COMMAND curl + -L + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg + -o + $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE vlc_installed + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg) - else () - execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-universal.dmg) - endif () + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) target_include_directories( ll::libvlc SYSTEM INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/include) target_link_directories( ll::libvlc INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib) target_link_libraries( ll::libvlc INTERFACE vlc vlccore ) @@ -28,13 +47,11 @@ if (USESYSTEMLIBS) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") return() - else (USESYSTEMLIBS) use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") - endif (USESYSTEMLIBS) if (WINDOWS) -- cgit v1.2.3 From 199d71b2baa76f1719cd074b60051db40886f7c0 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 15:22:41 +0800 Subject: Download & install aren't redone when installed by making sure we *write* the _installed files (containing the value 0). --- indra/cmake/CEFPlugin.cmake | 2 ++ indra/cmake/FMODSTUDIO.cmake | 1 + indra/cmake/Meshoptimizer.cmake | 1 + indra/cmake/OpenJPEG.cmake | 1 + 4 files changed, 5 insertions(+) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 921a6e8032..3cf753e69d 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -18,6 +18,7 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} RESULT_VARIABLE dullahan_installed ) + file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "${dullahan_installed}") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) @@ -32,6 +33,7 @@ elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} RESULT_VARIABLE dullahan_installed ) + file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "${dullahan_installed}") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 39636d7522..c5839f6174 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -86,6 +86,7 @@ if (USE_FMODSTUDIO) RESULT_VARIABLE ${_binary}_installed ) endif (DARWIN) + file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "${fmodstudio_installed}") else (USESYSTEMLIBS) use_prebuilt_binary(fmodstudio) endif (USESYSTEMLIBS) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index e926d8118c..7eb1d3cf77 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -54,6 +54,7 @@ if (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} RESULT_VARIABLE meshoptimizer_installed ) + file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "${meshoptimizer_installed}") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) else (USESYSTEMLIBS) use_prebuilt_binary(meshoptimizer) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 778cf62e29..16603ac9e5 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -41,6 +41,7 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} RESULT_VARIABLE openjpeg_installed ) + file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) else (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) use_prebuilt_binary(openjpeg) -- cgit v1.2.3 From 0f72582a734dcd585627341ddb16678d18e373ac Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 15:26:16 +0800 Subject: Don't redownload sse2neon if already installed --- indra/llcommon/CMakeLists.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 9811e705a0..a62a72c79c 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -294,13 +294,19 @@ target_link_libraries( target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -if (CMAKE_OSX_ARCHITECTURES MATCHES "(x86_64;)*arm64(;x86_64)*") - execute_process(COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/sse2neon) - execute_process(COMMAND curl - -OL - https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon - ) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) + execute_process( + COMMAND mkdir -p include/sse2neon + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + ) + execute_process( + COMMAND curl -OL https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon + RESULT_VARIABLE sse2neon_installed + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "${sse2neon_installed}") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) target_include_directories(llcommon PUBLIC ${AUTOBUILD_INSTALL_DIR}/include/sse2neon) endif () -- cgit v1.2.3 From 19d47a44d97a3b4fdd84cef9732e79d2708e4c12 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 15:28:13 +0800 Subject: Remove unnecessary LINUX condition in Fedora test --- indra/cmake/CEFPlugin.cmake | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 3cf753e69d..24d76b03e7 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -37,14 +37,12 @@ elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) - if (LINUX) - if (${LINUX_DISTRO} MATCHES fedora) - execute_process( - COMMAND patchelf --remove-rpath bin/release/dullahan_host - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} - ) - endif (${LINUX_DISTRO} MATCHES fedora) - endif (LINUX) + if (${LINUX_DISTRO} MATCHES fedora) + execute_process( + COMMAND patchelf --remove-rpath bin/release/dullahan_host + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + ) + endif (${LINUX_DISTRO} MATCHES fedora) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) -- cgit v1.2.3 From 284a15878801969f75fd427a1be0a3ca1912e969 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 15:30:31 +0800 Subject: Remove unarchived dependencies after config/build also fix ${_binary} to its intended fmodstudio name. --- indra/cmake/FMODSTUDIO.cmake | 6 +++--- indra/cmake/Meshoptimizer.cmake | 4 ++++ indra/cmake/OpenJPEG.cmake | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index c5839f6174..9f82cf3db8 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -81,9 +81,9 @@ if (USE_FMODSTUDIO) ${AUTOBUILD_INSTALL_DIR}/lib/release/ ) execute_process( - COMMAND rm -rf /tmp/fmodstudioapi20223linux - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - RESULT_VARIABLE ${_binary}_installed + COMMAND rm -rf fmodstudioapi20223linux + WORKING_DIRECTORY /tmp + RESULT_VARIABLE fmodstudio_installed ) endif (DARWIN) file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "${fmodstudio_installed}") diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 7eb1d3cf77..f57dbb1be6 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -52,6 +52,10 @@ if (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) COMMAND cp /tmp/meshoptimizer-0.21/src/meshoptimizer.h ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer/ COMMAND cp /tmp/meshoptimizer-0.21/libmeshoptimizer.a ${AUTOBUILD_INSTALL_DIR}/lib/release/ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + ) + execute_process( + COMMAND rm -rf meshoptimizer-0.21 + WORKING_DIRECTORY /tmp RESULT_VARIABLE meshoptimizer_installed ) file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "${meshoptimizer_installed}") diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 16603ac9e5..4a735e0041 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -39,6 +39,10 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ /tmp/openjpeg-2.5.2/src/lib/openjp2/opj_config_private.h ${AUTOBUILD_INSTALL_DIR}/include/openjpeg-2.5/ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + ) + execute_process( + COMMAND rm -rf openjpeg-2.5.2 + WORKING_DIRECTORY /tmp RESULT_VARIABLE openjpeg_installed ) file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") -- cgit v1.2.3 From a350a4a26070a621fcfab58548f7993d158c1cd6 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 15:36:30 +0800 Subject: Right WORKING_DIRECTORY values to shorten paths --- indra/cmake/CEFPlugin.cmake | 20 ++++++--------- indra/cmake/FMODSTUDIO.cmake | 55 ++++++++++++++++++++++------------------- indra/cmake/LibVLCPlugin.cmake | 18 +++++--------- indra/cmake/Meshoptimizer.cmake | 6 ++--- indra/cmake/OpenJPEG.cmake | 8 +++--- 5 files changed, 50 insertions(+), 57 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 24d76b03e7..886d77e040 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -7,14 +7,12 @@ add_library( ll::cef INTERFACE IMPORTED ) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) - execute_process(COMMAND curl - -O - https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + execute_process( + COMMAND curl -O https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 WORKING_DIRECTORY $ENV{HOME}/Downloads ) - execute_process(COMMAND tar - xf - $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + execute_process( + COMMAND tar xf $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} RESULT_VARIABLE dullahan_installed ) @@ -22,14 +20,12 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) - execute_process(COMMAND curl - -O - https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + execute_process( + COMMAND curl -O https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 WORKING_DIRECTORY $ENV{HOME}/Downloads ) - execute_process(COMMAND tar - xf - $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + execute_process( + COMMAND tar xf $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} RESULT_VARIABLE dullahan_installed ) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 9f82cf3db8..5b99a01413 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -35,50 +35,53 @@ if (USE_FMODSTUDIO) execute_process( COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/fmodstudioapi20223mac-installer.dmg COMMAND mkdir -p - ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio - ${AUTOBUILD_INSTALL_DIR}/lib/release + include/fmodstudio + lib/release + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} ) execute_process( COMMAND cp - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod.h - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod.hpp - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_codec.h - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_common.h - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_dsp.h - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_dsp_effects.h - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_errors.h - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_output.h + inc/fmod.h + inc/fmod.hpp + inc/fmod_codec.h + inc/fmod_common.h + inc/fmod_dsp.h + inc/fmod_dsp_effects.h + inc/fmod_errors.h + inc/fmod_output.h ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio/ COMMAND cp - /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/lib/libfmod.dylib ${AUTOBUILD_INSTALL_DIR}/lib/release/ + WORKING_DIRECTORY /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core ) execute_process( - COMMAND hdiutil detach /Volumes/FMOD\ Programmers\ API\ Mac - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - RESULT_VARIABLE ${_binary}_installed + COMMAND hdiutil detach FMOD\ Programmers\ API\ Mac + WORKING_DIRECTORY /Volumes + RESULT_VARIABLE fmodstudio_installed ) else (DARWIN) execute_process( - COMMAND tar -xf $ENV{HOME}/Downloads/fmodstudioapi20223linux.tar.gz -C /tmp COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio + COMMAND tar -xf $ENV{HOME}/Downloads/fmodstudioapi20223linux.tar.gz + WORKING_DIRECTORY /tmp ) execute_process( COMMAND cp - /tmp/fmodstudioapi20223linux/api/core/inc/fmod.h - /tmp/fmodstudioapi20223linux/api/core/inc/fmod.hpp - /tmp/fmodstudioapi20223linux/api/core/inc/fmod_codec.h - /tmp/fmodstudioapi20223linux/api/core/inc/fmod_common.h - /tmp/fmodstudioapi20223linux/api/core/inc/fmod_dsp.h - /tmp/fmodstudioapi20223linux/api/core/inc/fmod_dsp_effects.h - /tmp/fmodstudioapi20223linux/api/core/inc/fmod_errors.h - /tmp/fmodstudioapi20223linux/api/core/inc/fmod_output.h + inc/fmod.h + inc/fmod.hpp + inc/fmod_codec.h + inc/fmod_common.h + inc/fmod_dsp.h + inc/fmod_dsp_effects.h + inc/fmod_errors.h + inc/fmod_output.h ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio/ COMMAND cp -P - /tmp/fmodstudioapi20223linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so - /tmp/fmodstudioapi20223linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 - /tmp/fmodstudioapi20223linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.23 + lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so + lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 + lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.23 ${AUTOBUILD_INSTALL_DIR}/lib/release/ + WORKING_DIRECTORY /tmp/fmodstudioapi20223linux/api/core ) execute_process( COMMAND rm -rf fmodstudioapi20223linux diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index c6f1423322..b59c5b3a38 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -9,12 +9,9 @@ if (USESYSTEMLIBS) if (DARWIN) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - execute_process(COMMAND curl - -L - https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg - -o - $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + execute_process( + COMMAND curl -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg + WORKING_DIRECTORY $ENV{HOME}/Downloads RESULT_VARIABLE vlc_installed ) file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") @@ -22,12 +19,9 @@ if (USESYSTEMLIBS) execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - execute_process(COMMAND curl - -L - https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg - -o - $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + execute_process( + COMMAND curl -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg + WORKING_DIRECTORY $ENV{HOME}/Downloads RESULT_VARIABLE vlc_installed ) file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index f57dbb1be6..1e95dfdc01 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -49,9 +49,9 @@ if (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) WORKING_DIRECTORY /tmp/meshoptimizer-0.21 ) execute_process( - COMMAND cp /tmp/meshoptimizer-0.21/src/meshoptimizer.h ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer/ - COMMAND cp /tmp/meshoptimizer-0.21/libmeshoptimizer.a ${AUTOBUILD_INSTALL_DIR}/lib/release/ - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + COMMAND cp src/meshoptimizer.h ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer/ + COMMAND cp libmeshoptimizer.a ${AUTOBUILD_INSTALL_DIR}/lib/release/ + WORKING_DIRECTORY /tmp/meshoptimizer-0.21 ) execute_process( COMMAND rm -rf meshoptimizer-0.21 diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 4a735e0041..33323cac28 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -34,11 +34,11 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ ) execute_process( COMMAND cp - /tmp/openjpeg-2.5.2/src/lib/openjp2/cio.h - /tmp/openjpeg-2.5.2/src/lib/openjp2/event.h - /tmp/openjpeg-2.5.2/src/lib/openjp2/opj_config_private.h + cio.h + event.h + opj_config_private.h ${AUTOBUILD_INSTALL_DIR}/include/openjpeg-2.5/ - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + WORKING_DIRECTORY /tmp/openjpeg-2.5.2/src/lib/openjp2 ) execute_process( COMMAND rm -rf openjpeg-2.5.2 -- cgit v1.2.3 From bef1c20c4c8e3c081066478381056932a188faa6 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 15:37:45 +0800 Subject: Automatically lipo -thin libfmod.dylib --- indra/cmake/FMODSTUDIO.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 5b99a01413..92bef238d7 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -50,8 +50,10 @@ if (USE_FMODSTUDIO) inc/fmod_errors.h inc/fmod_output.h ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio/ - COMMAND cp - ${AUTOBUILD_INSTALL_DIR}/lib/release/ + COMMAND lipo + lib/libfmod.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.dylib WORKING_DIRECTORY /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core ) execute_process( -- cgit v1.2.3 From aa363ba3d396685fa1e2454a903656b4cc973bba Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 20:39:26 +0800 Subject: Automatic XMLRPC-EPI Mac download, build & install When linking to the static archive on arm64, it would fail with an error of undefined iconv symbols. When linking to the dynamic library, the path was to the dynamic library was still assumed to still be in /usr/local/lib, so specifically for the executable target, this needs to be changed (temporarily) to the one in the prebuilt directory first, to later be changed again by fixup_bundle to the bundled one in Frameworks. --- README.md | 26 ++------------ indra/cmake/XmlRpcEpi.cmake | 82 ++++++++++++++++++++++++++++++++++++++------ indra/newview/CMakeLists.txt | 11 +++--- 3 files changed, 81 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 481349cc07..72015925db 100644 --- a/README.md +++ b/README.md @@ -37,35 +37,13 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst $ cd - $ cd .. -$ tar xf ~/Downloads/xmlrpc-epi-0.54.2.tar.bz2 $ git clone https://github.com/secondlife/3p-openssl $ git clone https://github.com/secondlife/3p-curl $ git clone https://github.com/secondlife/3p-libndofdev -$ cd xmlrpc-epi-0.54.2 -$ export CPPFLAGS="$CPPFLAGS -I$PWD/src" -$ rm -f config.sub missing -$ autoreconf -is -$ mkdir -p build/x86_64-apple-darwin`uname -r` -$ cd build/x86_64-apple-darwin`uname -r` -$ export CFLAGS="-arch x86_64 -mmacosx-version-min=10.5" -$ ../../configure --host=x86_64-apple-darwin`uname -r` -$ make -j`sysctl -n hw.ncpu` -$ sudo make install -$ cd - -$ sed -i '' -e 's/XMLRPC_VALUE find_named_value/__attribute__((always_inline)) XMLRPC_VALUE find_named_value/g' src/xmlrpc_introspection.c -$ sed -i '' -e 's/void describe_method/__attribute__((always_inline)) void describe_method/g' src/xmlrpc_introspection.c -$ mkdir -p build/aarch64-apple-darwin`uname -r` -$ cd build/aarch64-apple-darwin`uname -r` -$ export CFLAGS="-arch arm64 -mmacosx-version-min=11.0" -$ ../../configure --host=aarch64-apple-darwin`uname -r` -$ make -j`sysctl -n hw.ncpu` -$ sudo lipo src/.libs/libxmlrpc-epi.a /usr/local/lib/libxmlrpc-epi.a -create -output /usr/local/lib/libxmlrpc-epi.a -$ sudo lipo src/.libs/libxmlrpc-epi.0.dylib /usr/local/lib/libxmlrpc-epi.0.dylib -create -output /usr/local/lib/libxmlrpc-epi.0.dylib -$ unset CPPFLAGS CFLAGS -$ cd ../../../3p-openssl/openssl +$ cd 3p-openssl/openssl $ mkdir -p build/aarch64-apple-darwin`uname -r` $ cd build/aarch64-apple-darwin`uname -r` $ ../../Configure no-shared darwin64-arm64-cc diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 994df3d128..91cc30537f 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -4,20 +4,82 @@ include(Prebuilt) include_guard() add_library( ll::xmlrpc-epi INTERFACE IMPORTED ) -if (USE_AUTOBUILD_3P OR USE_CONAN) +if (NOT USESYSTEMLIBS) use_system_binary( xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) -endif () - +elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed OR NOT ${xmlrpc-epi_installed} EQUAL 0)) + file(DOWNLOAD + https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 + ) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 + DESTINATION ${CMAKE_BINARY_DIR} + ) + file(MAKE_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/xmlrpc-epi) + file(COPY + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/base64.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/encodings.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/queue.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/simplestring.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_element.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_to_xmlrpc.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc_introspection.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi + ) + file(REMOVE + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/config.sub + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/missing + ) + execute_process( + COMMAND autoreconf -is + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + ) + set(ENV{CPPFLAGS} -I${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src) + set(ENV{CFLAGS} "-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.15") + if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND sed -i '' -e "s/XMLRPC_VALUE find_named_value/__attribute__((always_inline)) XMLRPC_VALUE find_named_value/g" + xmlrpc_introspection.c + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src + ) + execute_process( + COMMAND sed -i '' -e "s/void describe_method/__attribute__((always_inline)) void describe_method/g" + xmlrpc_introspection.c + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src + ) + execute_process( + COMMAND ./configure --host=aarch64-apple-darwin + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + ) + else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND ./configure --host=${CMAKE_OSX_ARCHITECTURES}-apple-darwin + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + ) + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND make -j${MAKE_JOBS} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + RESULT_VARIABLE xmlrpc-epi_installed + ) + unset(ENV{CPPFLAGS}) + unset(ENV{CFLAGS}) + file(COPY + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.dylib + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.0.dylib + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + FOLLOW_SYMLINK_CHAIN + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed "${xmlrpc-epi_installed}") +endif (NOT USESYSTEMLIBS) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) - -if (USE_AUTOBUILD_3P OR USE_CONAN) +if (NOT USESYSTEMLIBS) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) -elseif (LINUX) - target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE - ${CMAKE_SYSROOT}/usr/include/xmlrpc-epi) elseif (DARWIN) - target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE /usr/local/include) - target_link_directories( ll::xmlrpc-epi INTERFACE /usr/local/lib) + target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi) +elseif (LINUX) + target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${CMAKE_SYSROOT}/usr/include/xmlrpc-epi) endif () diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index bc597fb69e..19ecfe425c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2287,14 +2287,18 @@ if (DARWIN) ) if (USESYSTEMLIBS) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/English.lproj/InfoPlist.strings ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings ) - + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_INSTALL_NAME_TOOL} + -change "/usr/local/lib/libxmlrpc-epi.0.dylib" "${AUTOBUILD_INSTALL_DIR}/lib/release/libxmlrpc-epi.0.dylib" + ${VIEWER_APP_EXE} + VERBATIM + ) else (USESYSTEMLIBS) - add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD COMMAND ${PYTHON_EXECUTABLE} @@ -2319,7 +2323,6 @@ if (DARWIN) ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - endif (USESYSTEMLIBS) if (ENABLE_MEDIA_PLUGINS) -- cgit v1.2.3 From 07420ece4ae38c446ad58c3c3959cce5e00a6cf1 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 08:38:29 +0800 Subject: Automatic NanoSVG download/install on macOS/Debian --- indra/cmake/ViewerMiscLibs.cmake | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index fad95beae8..3e1d80ab7e 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -16,7 +16,29 @@ if (NOT USESYSTEMLIBS) use_prebuilt_binary(slvoice) use_prebuilt_binary(nanosvg) +elseif (${LINUX_DISTRO} MATCHES debian OR DARWIN) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) + if (DARWIN) + file(DOWNLOAD + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 + ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 + ) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 + DESTINATION ${LIBS_PREBUILT_DIR} + ) + else (DARWIN) + file(DOWNLOAD + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115397/993664/nanosvg-2022.09.27-linux-580337.tar.bz2 + ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 + ) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 + DESTINATION ${LIBS_PREBUILT_DIR} + ) + endif (DARWIN) + file(WRITE ${PREBUILD_TRACKING_DIR}/nanosvg_installed "${nanosvg_installed}") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) endif (NOT USESYSTEMLIBS) - use_prebuilt_binary(viewer-fonts) use_prebuilt_binary(emoji_shortcodes) -- cgit v1.2.3 From 3d2c32c80562106169b78305315e2bd5945fdf09 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 11:29:14 +0800 Subject: CMake file & try_compile replacing execute_process file(DOWNLOAD) replacing execute_process(COMMAND curl), file(ARCHIVE_EXTRACT) replacing execute_process(COMMAND tar xf), file(MAKE_DIRECTORY) replacing execute_process(COMMAND mkdir -p), file(COPY) replacing execute_process(COMMAND cp), file(RENAME) replacing execute_process(COMMAND mv), try_compile replacing execute_process(COMMAND cmake/make), LIBS_PREBUILT_DIR replacing AUTOBUILD_INSTALL_DIR, 0 replacing ${${_binary}_installed} where appropriate, no FMOD reinstallation when it's already installed, and archives & unarchived source/build directories are in CMake root binary directory, instead of /tmp. SHOW_PROGRESS is on for downloading Dullahan from the Megapahit website cause it can be slow. --- indra/cmake/CEFPlugin.cmake | 34 +++++++-------- indra/cmake/FMODSTUDIO.cmake | 90 ++++++++++++++++++++-------------------- indra/cmake/LibVLCPlugin.cmake | 28 +++++++------ indra/cmake/Meshoptimizer.cmake | 70 ++++++++++++++++--------------- indra/cmake/OpenJPEG.cmake | 44 ++++++++------------ indra/cmake/ViewerMiscLibs.cmake | 2 +- indra/cmake/XmlRpcEpi.cmake | 2 +- indra/llcommon/CMakeLists.txt | 16 +++---- 8 files changed, 140 insertions(+), 146 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 886d77e040..919328a42a 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -7,36 +7,36 @@ add_library( ll::cef INTERFACE IMPORTED ) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) - execute_process( - COMMAND curl -O https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 - WORKING_DIRECTORY $ENV{HOME}/Downloads + file(DOWNLOAD + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + SHOW_PROGRESS ) - execute_process( - COMMAND tar xf $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} - RESULT_VARIABLE dullahan_installed + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + DESTINATION ${LIBS_PREBUILT_DIR} ) - file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "${dullahan_installed}") + file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) - execute_process( - COMMAND curl -O https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 - WORKING_DIRECTORY $ENV{HOME}/Downloads + file(DOWNLOAD + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + SHOW_PROGRESS ) - execute_process( - COMMAND tar xf $ENV{HOME}/Downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} - RESULT_VARIABLE dullahan_installed + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + DESTINATION ${LIBS_PREBUILT_DIR} ) - file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "${dullahan_installed}") + file(WRITE ${PREBUILD_TRACKING_DIR}/dullahan_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) use_prebuilt_binary(dullahan) if (${LINUX_DISTRO} MATCHES fedora) execute_process( COMMAND patchelf --remove-rpath bin/release/dullahan_host - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + WORKING_DIRECTORY ${LIBS_PREBUILT_DIR} ) endif (${LINUX_DISTRO} MATCHES fedora) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 92bef238d7..e449adaf67 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -30,30 +30,33 @@ if (USE_FMODSTUDIO) # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL) # as accessing the private LL location will fail if you don't have the credential include(Prebuilt) - if (USESYSTEMLIBS) + if (USESYSTEMLIBS AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/fmodstudio_installed OR NOT ${fmodstudio_installed} EQUAL 0)) + file(MAKE_DIRECTORY + ${LIBS_PREBUILT_DIR}/include/fmodstudio + ${LIBS_PREBUILT_DIR}/lib/release + ) if (DARWIN) execute_process( - COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/fmodstudioapi20223mac-installer.dmg - COMMAND mkdir -p - include/fmodstudio - lib/release - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + COMMAND hdiutil attach -noverify fmodstudioapi20223mac-installer.dmg + WORKING_DIRECTORY $ENV{HOME}/Downloads + ) + file( + COPY + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod.hpp + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_codec.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_common.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_dsp.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_dsp_effects.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_errors.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_output.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/fmodstudio ) execute_process( - COMMAND cp - inc/fmod.h - inc/fmod.hpp - inc/fmod_codec.h - inc/fmod_common.h - inc/fmod_dsp.h - inc/fmod_dsp_effects.h - inc/fmod_errors.h - inc/fmod_output.h - ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio/ COMMAND lipo lib/libfmod.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output ${AUTOBUILD_INSTALL_DIR}/lib/release/libfmod.dylib + -output ${LIBS_PREBUILT_DIR}/lib/release/libfmod.dylib WORKING_DIRECTORY /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core ) execute_process( @@ -61,40 +64,37 @@ if (USE_FMODSTUDIO) WORKING_DIRECTORY /Volumes RESULT_VARIABLE fmodstudio_installed ) + file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "${fmodstudio_installed}") else (DARWIN) - execute_process( - COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio - COMMAND tar -xf $ENV{HOME}/Downloads/fmodstudioapi20223linux.tar.gz - WORKING_DIRECTORY /tmp + file(ARCHIVE_EXTRACT + INPUT $ENV{HOME}/Downloads/fmodstudioapi20223linux.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} ) - execute_process( - COMMAND cp - inc/fmod.h - inc/fmod.hpp - inc/fmod_codec.h - inc/fmod_common.h - inc/fmod_dsp.h - inc/fmod_dsp_effects.h - inc/fmod_errors.h - inc/fmod_output.h - ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio/ - COMMAND cp -P - lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so - lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 - lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.23 - ${AUTOBUILD_INSTALL_DIR}/lib/release/ - WORKING_DIRECTORY /tmp/fmodstudioapi20223linux/api/core + file( + COPY + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod.hpp + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod_codec.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod_common.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod_dsp.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod_dsp_effects.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod_errors.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/inc/fmod_output.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/fmodstudio ) - execute_process( - COMMAND rm -rf fmodstudioapi20223linux - WORKING_DIRECTORY /tmp - RESULT_VARIABLE fmodstudio_installed + file( + COPY + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 + ${CMAKE_BINARY_DIR}/fmodstudioapi20223linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.23 + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + FOLLOW_SYMLINK_CHAIN ) + file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "0") endif (DARWIN) - file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "${fmodstudio_installed}") - else (USESYSTEMLIBS) + else (USESYSTEMLIBS AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/fmodstudio_installed OR NOT ${fmodstudio_installed} EQUAL 0)) use_prebuilt_binary(fmodstudio) - endif (USESYSTEMLIBS) + endif (USESYSTEMLIBS AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/fmodstudio_installed OR NOT ${fmodstudio_installed} EQUAL 0)) if (WINDOWS) target_link_libraries( ll::fmodstudio INTERFACE fmod_vc) elseif (DARWIN) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index b59c5b3a38..29d71d7dba 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -9,24 +9,28 @@ if (USESYSTEMLIBS) if (DARWIN) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - execute_process( - COMMAND curl -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg - WORKING_DIRECTORY $ENV{HOME}/Downloads - RESULT_VARIABLE vlc_installed + file(DOWNLOAD + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg + ${CMAKE_BINARY_DIR}/vlc-3.0.21-arm64.dmg ) - file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") + file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg) + execute_process( + COMMAND hdiutil attach -noverify vlc-3.0.21-arm64.dmg + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - execute_process( - COMMAND curl -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg - WORKING_DIRECTORY $ENV{HOME}/Downloads - RESULT_VARIABLE vlc_installed + file(DOWNLOAD + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg + ${CMAKE_BINARY_DIR}/vlc-3.0.21-intel64.dmg ) - file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") + file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg) + execute_process( + COMMAND hdiutil attach -noverify vlc-3.0.21-intel64.dmg + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) target_include_directories( ll::libvlc SYSTEM INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/include) target_link_directories( ll::libvlc INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 1e95dfdc01..9098dc38e1 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -18,47 +18,49 @@ endif (NOT USESYSTEMLIBS) if (${LINUX_DISTRO} MATCHES fedora 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) - execute_process( - COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer - COMMAND curl - -L https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz - -o meshoptimizer-0.21.tar.gz - WORKING_DIRECTORY $ENV{HOME}/Downloads + file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/meshoptimizer) + file(DOWNLOAD + https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz + ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz ) - execute_process( - COMMAND tar xf $ENV{HOME}/Downloads/meshoptimizer-0.21.tar.gz - WORKING_DIRECTORY /tmp - ) - execute_process( - COMMAND cmake - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - . - WORKING_DIRECTORY /tmp/meshoptimizer-0.21 + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} ) if (DARWIN) - execute_process( - COMMAND cmake + 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 - . - WORKING_DIRECTORY /tmp/meshoptimizer-0.21 + 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) - execute_process( - COMMAND make -j${MAKE_JOBS} - WORKING_DIRECTORY /tmp/meshoptimizer-0.21 - ) - execute_process( - COMMAND cp src/meshoptimizer.h ${AUTOBUILD_INSTALL_DIR}/include/meshoptimizer/ - COMMAND cp libmeshoptimizer.a ${AUTOBUILD_INSTALL_DIR}/lib/release/ - WORKING_DIRECTORY /tmp/meshoptimizer-0.21 - ) - execute_process( - COMMAND rm -rf meshoptimizer-0.21 - WORKING_DIRECTORY /tmp - RESULT_VARIABLE meshoptimizer_installed - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "${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 (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) else (USESYSTEMLIBS) use_prebuilt_binary(meshoptimizer) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 33323cac28..0c145981c2 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -15,44 +15,36 @@ elseif (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES Fr endif (NOT USESYSTEMLIBS) if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) - execute_process( - COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/openjpeg-2.5 - COMMAND curl - -L https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz - -o openjpeg-2.5.2.tar.gz - WORKING_DIRECTORY $ENV{HOME}/Downloads + file(DOWNLOAD + https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz + ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz ) - execute_process( - COMMAND tar xf $ENV{HOME}/Downloads/openjpeg-2.5.2.tar.gz - WORKING_DIRECTORY /tmp + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} ) + file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5) execute_process( COMMAND cmake -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} . - WORKING_DIRECTORY /tmp/openjpeg-2.5.2 - ) - execute_process( - COMMAND cp - cio.h - event.h - opj_config_private.h - ${AUTOBUILD_INSTALL_DIR}/include/openjpeg-2.5/ - WORKING_DIRECTORY /tmp/openjpeg-2.5.2/src/lib/openjp2 - ) - execute_process( - COMMAND rm -rf openjpeg-2.5.2 - WORKING_DIRECTORY /tmp + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openjpeg-2.5.2 RESULT_VARIABLE openjpeg_installed ) + file( + COPY + ${CMAKE_BINARY_DIR}/openjpeg-2.5.2/src/lib/openjp2/cio.h + ${CMAKE_BINARY_DIR}/openjpeg-2.5.2/src/lib/openjp2/event.h + ${CMAKE_BINARY_DIR}/openjpeg-2.5.2/src/lib/openjp2/opj_config_private.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 + ) file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) else (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) use_prebuilt_binary(openjpeg) - execute_process(COMMAND mv - openjpeg - openjpeg-2.5 - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include + file(RENAME + ${LIBS_PREBUILT_DIR}/include/openjpeg + ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 ) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 3e1d80ab7e..cb26a7b1b8 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -37,7 +37,7 @@ elseif (${LINUX_DISTRO} MATCHES debian OR DARWIN) DESTINATION ${LIBS_PREBUILT_DIR} ) endif (DARWIN) - file(WRITE ${PREBUILD_TRACKING_DIR}/nanosvg_installed "${nanosvg_installed}") + file(WRITE ${PREBUILD_TRACKING_DIR}/nanosvg_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) endif (NOT USESYSTEMLIBS) use_prebuilt_binary(viewer-fonts) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 91cc30537f..a585da758d 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -17,7 +17,7 @@ elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${ INPUT ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 DESTINATION ${CMAKE_BINARY_DIR} ) - file(MAKE_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/xmlrpc-epi) + file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi) file(COPY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/base64.h ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/encodings.h diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index a62a72c79c..41e2a6ebf3 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -296,18 +296,14 @@ target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) - execute_process( - COMMAND mkdir -p include/sse2neon - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/sse2neon) + file(DOWNLOAD + https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h + ${LIBS_PREBUILT_DIR}/include/sse2neon ) - execute_process( - COMMAND curl -OL https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h - WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon - RESULT_VARIABLE sse2neon_installed - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "${sse2neon_installed}") + file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) - target_include_directories(llcommon PUBLIC ${AUTOBUILD_INSTALL_DIR}/include/sse2neon) + target_include_directories(llcommon PUBLIC ${LIBS_PREBUILT_DIR}/include/sse2neon) endif () if (USE_AUTOBUILD_3P OR USE_CONAN) -- cgit v1.2.3 From d737f89e7d41a66bc3d2d44762974e9dc9066e73 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 13:19:04 +0800 Subject: Remove NanoSVG installation instructions The installation is already automatic. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index 72015925db..b08615ea06 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst $ cd - $ cd .. $ git clone https://github.com/secondlife/3p-openssl @@ -64,7 +64,6 @@ $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 $ make -j`sysctl -n hw.ncpu` $ cd ../../../../viewer/build/universal-apple-darwin`uname -r`/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-darwin64-513145c.tar.zst -$ tar xf ~/Downloads/nanosvg-2022.09.27-darwin64-580364.tar.bz2 $ tar xf ~/Downloads/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst $ tar xf ~/Downloads/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst $ cd lib/release @@ -99,12 +98,6 @@ $ rm CMakeCache.txt #### Debian 12.5 ``` -$ cd ~/Downloads -$ curl -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115397/993664/nanosvg-2022.09.27-linux-580337.tar.bz2 -$ cd - -$ cd packages -$ tar xf ~/Downloads/nanosvg-2022.09.27-linux-580337.tar.bz2 -$ cd .. $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpng-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxmlrpc-epi-dev libxxhash-dev $ 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 -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../../indra $ make -j`nproc` -- cgit v1.2.3 From 2726282b1929b7adbf2e5810655221d5d5da0c9f Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 14:22:42 +0800 Subject: Automatic libndofdev download, build & install I couldn't get try_compile to succeed using COMPILE_DEFINITIONS, I couldn't either using quotes for the CMAKE_C_FLAGS. --- README.md | 13 ++----------- indra/cmake/NDOF.cmake | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b08615ea06..1ecf951358 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,11 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst $ cd - $ cd .. $ git clone https://github.com/secondlife/3p-openssl $ git clone https://github.com/secondlife/3p-curl -$ git clone https://github.com/secondlife/3p-libndofdev $ cd 3p-openssl/openssl $ mkdir -p build/aarch64-apple-darwin`uname -r` $ cd build/aarch64-apple-darwin`uname -r` @@ -57,20 +56,13 @@ $ ../../configure --host=aarch64-apple-darwin`uname -r` --disable-alt-svc --disa $ make -j`sysctl -n hw.ncpu` $ sudo port activate openssl3 $ unset CFLAGS -$ cd ../../../../3p-libndofdev/libndofdev -$ mkdir -p build/aarch64-apple-darwin`uname -r` -$ cd build/aarch64-apple-darwin`uname -r` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_C_FLAGS:STRING="-DTARGET_OS_MAC -Wno-int-conversion" ../.. -$ make -j`sysctl -n hw.ncpu` $ cd ../../../../viewer/build/universal-apple-darwin`uname -r`/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-darwin64-513145c.tar.zst -$ tar xf ~/Downloads/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst $ tar xf ~/Downloads/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst $ cd lib/release $ lipo ../../../../../../3p-openssl/openssl/build/aarch64-apple-darwin`uname -r`/libcrypto.a libcrypto.a -create -output libcrypto.a $ lipo ../../../../../../3p-openssl/openssl/build/aarch64-apple-darwin`uname -r`/libssl.a libssl.a -create -output libssl.a $ lipo ../../../../../../3p-curl/curl/build/aarch64-apple-darwin`uname -r`/lib/.libs/libcurl.a libcurl.a -create -output libcurl.a -$ lipo ../../../../../../3p-libndofdev/libndofdev/build/aarch64-apple-darwin`uname -r`/src/libndofdev.dylib libndofdev.dylib -create -output libndofdev.dylib $ cd ../../.. $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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 -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra @@ -84,11 +76,10 @@ $ open newview/Megapahit.app ``` $ mkdir -p build/`uname -m`-linux-gnu/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/3p-open-libndofdev/releases/download/v1.14-r2/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst $ cd - $ cd build/`uname -m`-linux-gnu/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-linux64-513145c.tar.zst -$ tar xf ~/Downloads/open_libndofdev-0.14.8730039102-linux64-8730039102.tar.zst $ tar xf ~/Downloads/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst $ cd .. $ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 326ef26c2c..456507e1bd 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -7,13 +7,47 @@ include_guard() add_library( ll::ndof INTERFACE IMPORTED ) if (NDOF) - if (NOT USESYSTEMLIBS) 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) + 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 + ) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} + ) + try_compile(LIBNDOFDEV_RESULT + PROJECT libndofdev + 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 + OUTPUT_VARIABLE libndofdev_installed + ) + if (${LIBNDOFDEV_RESULT}) + file( + COPY ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev/src/ndofdev_external.h + DESTINATION ${LIBS_PREBUILT_DIR}/include + ) + file( + 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 "${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) elseif (LINUX) use_prebuilt_binary(open-libndofdev) endif (WINDOWS OR DARWIN) - endif (NOT USESYSTEMLIBS) if (WINDOWS) target_link_libraries( ll::ndof INTERFACE libndofdev) -- cgit v1.2.3 From 39eb5087ab54328f8f066c251f68a2cde00ef16d Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 14:50:17 +0800 Subject: Path to file for sse2neon, not just the directory --- indra/llcommon/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 41e2a6ebf3..3c8c8031f2 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -299,7 +299,7 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/sse2neon) file(DOWNLOAD https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h - ${LIBS_PREBUILT_DIR}/include/sse2neon + ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h ) file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) -- cgit v1.2.3 From 6ad073ffb90f66f9665ad340388500c0961fb9bd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 14:51:06 +0800 Subject: Rename openjpeg to openjpeg-2.5 only if not done yet, i.e. OpenJPEG not installed yet. --- indra/cmake/OpenJPEG.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 0c145981c2..234e0065bc 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -42,10 +42,12 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) else (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) use_prebuilt_binary(openjpeg) - file(RENAME - ${LIBS_PREBUILT_DIR}/include/openjpeg - ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 - ) + if (EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg) + file(RENAME + ${LIBS_PREBUILT_DIR}/include/openjpeg + ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 + ) + endif (EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) endif (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) -- cgit v1.2.3 From 3d32b55509f531127bcc030942160ec6f341fcbf Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 14:51:54 +0800 Subject: Remove already implied file(MAKE_DIRECTORY) file(COPY) seems to already include making the necessary directories. --- indra/cmake/FMODSTUDIO.cmake | 4 ---- indra/cmake/Meshoptimizer.cmake | 1 - indra/cmake/OpenJPEG.cmake | 1 - indra/cmake/XmlRpcEpi.cmake | 1 - 4 files changed, 7 deletions(-) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index e449adaf67..a8bf087ece 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -31,10 +31,6 @@ if (USE_FMODSTUDIO) # as accessing the private LL location will fail if you don't have the credential include(Prebuilt) if (USESYSTEMLIBS AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/fmodstudio_installed OR NOT ${fmodstudio_installed} EQUAL 0)) - file(MAKE_DIRECTORY - ${LIBS_PREBUILT_DIR}/include/fmodstudio - ${LIBS_PREBUILT_DIR}/lib/release - ) if (DARWIN) execute_process( COMMAND hdiutil attach -noverify fmodstudioapi20223mac-installer.dmg diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 9098dc38e1..62d5c558ac 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -18,7 +18,6 @@ endif (NOT USESYSTEMLIBS) if (${LINUX_DISTRO} MATCHES fedora 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) - file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/meshoptimizer) file(DOWNLOAD https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 234e0065bc..75f39ce8bc 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -23,7 +23,6 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ INPUT ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) - file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5) execute_process( COMMAND cmake -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index a585da758d..e0482482ec 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -17,7 +17,6 @@ elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${ INPUT ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 DESTINATION ${CMAKE_BINARY_DIR} ) - file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi) file(COPY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/base64.h ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/encodings.h -- cgit v1.2.3 From d9b7e392dd2777246e06f7816e6258aabfeecb6a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 19:39:41 +0800 Subject: Automatic OpenSSL download, build and installation --- README.md | 32 +--------- indra/cmake/OpenSSL.cmake | 154 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 155 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 1ecf951358..ce8c34089a 100644 --- a/README.md +++ b/README.md @@ -37,17 +37,11 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst $ cd - $ cd .. -$ git clone https://github.com/secondlife/3p-openssl $ git clone https://github.com/secondlife/3p-curl -$ cd 3p-openssl/openssl -$ mkdir -p build/aarch64-apple-darwin`uname -r` -$ cd build/aarch64-apple-darwin`uname -r` -$ ../../Configure no-shared darwin64-arm64-cc -$ make -j`sysctl -n hw.ncpu` -$ cd ../../../../3p-curl/curl +$ cd 3p-curl/curl $ mkdir -p build/aarch64-apple-darwin`uname -r` $ cd build/aarch64-apple-darwin`uname -r` $ export CFLAGS="-arch arm64 -mmacosx-version-min=11.0 -std=c90" @@ -58,10 +52,7 @@ $ sudo port activate openssl3 $ unset CFLAGS $ cd ../../../../viewer/build/universal-apple-darwin`uname -r`/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-darwin64-513145c.tar.zst -$ tar xf ~/Downloads/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst $ cd lib/release -$ lipo ../../../../../../3p-openssl/openssl/build/aarch64-apple-darwin`uname -r`/libcrypto.a libcrypto.a -create -output libcrypto.a -$ lipo ../../../../../../3p-openssl/openssl/build/aarch64-apple-darwin`uname -r`/libssl.a libssl.a -create -output libssl.a $ lipo ../../../../../../3p-curl/curl/build/aarch64-apple-darwin`uname -r`/lib/.libs/libcurl.a libcurl.a -create -output libcurl.a $ cd ../../.. $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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" @@ -76,11 +67,10 @@ $ open newview/Megapahit.app ``` $ mkdir -p build/`uname -m`-linux-gnu/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst $ cd - $ cd build/`uname -m`-linux-gnu/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-linux64-513145c.tar.zst -$ tar xf ~/Downloads/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst $ cd .. $ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" $ rm CMakeCache.txt @@ -122,22 +112,6 @@ $ megapahit ### FreeBSD ``` -$ mkdir -p build/`uname -m`-unknown-freebsd14.1/packages -$ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst -$ cd - -$ cd .. -$ git clone https://github.com/secondlife/3p-openssl -$ git clone https://github.com/secondlife/3p-curl -$ cd 3p-openssl/openssl -$ mkdir -p build/`uname -m`-unknown-freebsd14.1 -$ cd -p build/`uname -m`-unknown-freebsd14.1 -$ ../../config no-shared -$ make -j`nproc` -$ cd ../../../../viewer/build/`uname -m`-unknown-freebsd14.1/packages -$ tar xf ~/Downloads/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst -$ cp ../../../../3p-openssl/openssl/build/`uname -m`-unknown-freebsd14.1/lib*.a lib/release/ -$ cd .. $ setenv LL_BUILD "-O3 -std=c++17 -fPIC" $ sudo su - # portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/collada-dom x11-toolkits/fltk textproc/hunspell misc/meshoptimizer graphics/nanosvg graphics/openjpeg devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis net/xmlrpc-epi devel/xxhash diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 26508dc429..4481b3460f 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -4,8 +4,158 @@ include(Prebuilt) include_guard() add_library( ll::openssl INTERFACE IMPORTED ) -#use_system_binary(openssl) -#use_prebuilt_binary(openssl) +if (NOT USESYSTEMLIBS) +use_system_binary(openssl) +endif (NOT USESYSTEMLIBS) +if (CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR LINUX OR NOT USESYSTEMLIBS) +use_prebuilt_binary(openssl) +elseif (${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}/3p-openssl-1.1.1q.de53f55.tar.gz) + file(DOWNLOAD + https://github.com/secondlife/3p-openssl/archive/refs/tags/v1.1.1q.de53f55.tar.gz + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55.tar.gz + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55.tar.gz) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} + ) + if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + set(ENV{CFLAGS} "-mmacosx-version-min=11.0") + execute_process( + COMMAND ./Configure no-shared darwin64-arm64-cc + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl + ) + else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND ./config no-shared + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl + ) + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND make -j${MAKE_JOBS} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl + RESULT_VARIABLE openssl_installed + ) + if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + unset(ENV{CFLAGS}) + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + file( + COPY + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/aes.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/bnerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/conf_api.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/dtls1.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/evperr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/obj_mac.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pkcs12.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rsa.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/stack.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/x509.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/asn1.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/buffer.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/conferr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/e_os2.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/hmac.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/objects.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pkcs12err.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rsaerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/store.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/x509_vfy.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/asn1_mac.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/buffererr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/crypto.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ebcdic.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/idea.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/objectserr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pkcs7.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/safestack.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/storeerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/x509err.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/asn1err.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/camellia.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/cryptoerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ec.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/kdf.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ocsp.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pkcs7err.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/seed.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/symhacks.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/x509v3.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/asn1t.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/cast.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ct.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ecdh.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/kdferr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ocsperr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rand.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/sha.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/tls1.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/x509v3err.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/async.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/cmac.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/cterr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ecdsa.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/lhash.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/opensslconf.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rand_drbg.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/srp.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ts.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/asyncerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/cms.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/des.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ecerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/md2.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/opensslv.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/randerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/srtp.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/tserr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/bio.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/cmserr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/dh.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/engine.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/md4.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ossl_typ.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rc2.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ssl.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/txt_db.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/bioerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/comp.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/dherr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/engineerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/md5.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pem.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rc4.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ssl2.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ui.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/blowfish.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/comperr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/dsa.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/err.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/mdc2.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pem2.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/rc5.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ssl3.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/uierr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/bn.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/conf.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/dsaerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/evp.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/modes.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/pemerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/ripemd.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/sslerr.h + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/include/openssl/whrlpool.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/openssl + ) + file( + COPY + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/libcrypto.a + ${CMAKE_BINARY_DIR}/3p-openssl-1.1.1q.de53f55/openssl/libssl.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/openssl_installed "${openssl_installed}") +endif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR LINUX OR NOT USESYSTEMLIBS) if (WINDOWS) target_link_libraries(ll::openssl INTERFACE libssl libcrypto) elseif (LINUX) -- cgit v1.2.3 From 6ab3711d9bde07d40e8f3bf5a139ff54262d73d3 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 19:41:10 +0800 Subject: libtool for building xmlrpc-epi & tidy up its cmake Also CMakeCache.txt removal and Debian dependencies that might not be relevant on non-debootstraps are not part of the instructions. --- README.md | 6 ++---- indra/cmake/XmlRpcEpi.cmake | 26 ++++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ce8c34089a..a5c6a3a656 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ $ cd viewer ### macOS ``` -$ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib +$ sudo port install cmake pkgconfig autoconf automake libtool apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads $ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst @@ -73,13 +73,12 @@ $ cd build/`uname -m`-linux-gnu/packages $ tar xf ~/Downloads/curl-7.54.1-513145c-linux64-513145c.tar.zst $ cd .. $ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" -$ rm CMakeCache.txt ``` #### Debian 12.5 ``` -$ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpng-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxmlrpc-epi-dev libxxhash-dev +$ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev $ 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 -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 @@ -116,7 +115,6 @@ $ setenv LL_BUILD "-O3 -std=c++17 -fPIC" $ sudo su - # portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/collada-dom x11-toolkits/fltk textproc/hunspell misc/meshoptimizer graphics/nanosvg graphics/openjpeg devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis net/xmlrpc-epi devel/xxhash # exit -$ rm CMakeCache.txt $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -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 diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index e0482482ec..b9a3ac1c14 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -17,15 +17,16 @@ elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${ INPUT ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 DESTINATION ${CMAKE_BINARY_DIR} ) - file(COPY - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/base64.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/encodings.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/queue.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/simplestring.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_element.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_to_xmlrpc.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc.h - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc_introspection.h + file( + COPY + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/base64.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/encodings.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/queue.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/simplestring.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_element.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xml_to_xmlrpc.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc.h + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/xmlrpc_introspection.h DESTINATION ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi ) file(REMOVE @@ -66,9 +67,10 @@ elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${ ) unset(ENV{CPPFLAGS}) unset(ENV{CFLAGS}) - file(COPY - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.dylib - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.0.dylib + file( + COPY + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.dylib + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.0.dylib DESTINATION ${LIBS_PREBUILT_DIR}/lib/release FOLLOW_SYMLINK_CHAIN ) -- cgit v1.2.3 From 712b4d935dad7cab52a482994b9e999cc3675d40 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 22:51:01 +0800 Subject: Only download when there aren't the files yet --- indra/cmake/CEFPlugin.cmake | 24 ++++++++++++++---------- indra/cmake/LibVLCPlugin.cmake | 20 ++++++++++++-------- indra/cmake/Meshoptimizer.cmake | 10 ++++++---- indra/cmake/OpenJPEG.cmake | 10 ++++++---- indra/cmake/ViewerMiscLibs.cmake | 20 ++++++++++++-------- indra/cmake/XmlRpcEpi.cmake | 10 ++++++---- indra/llcommon/CMakeLists.txt | 10 ++++++---- 7 files changed, 62 insertions(+), 42 deletions(-) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 919328a42a..119a41f570 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -7,11 +7,13 @@ add_library( ll::cef INTERFACE IMPORTED ) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) - file(DOWNLOAD - https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 - ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 - SHOW_PROGRESS - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2) + file(DOWNLOAD + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 + SHOW_PROGRESS + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2) file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070244.tar.bz2 DESTINATION ${LIBS_PREBUILT_DIR} @@ -20,11 +22,13 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/dullahan_installed OR NOT ${dullahan_installed} EQUAL 0) - file(DOWNLOAD - https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 - ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 - SHOW_PROGRESS - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2) + file(DOWNLOAD + https://megapahit.net/downloads/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 + SHOW_PROGRESS + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2) file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/dullahan-1.14.0.202312131437_118.7.1_g99817d2_chromium-118.0.5993.119-darwin64-242070158.tar.bz2 DESTINATION ${LIBS_PREBUILT_DIR} diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 29d71d7dba..779576a485 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -9,10 +9,12 @@ if (USESYSTEMLIBS) if (DARWIN) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - file(DOWNLOAD - https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg - ${CMAKE_BINARY_DIR}/vlc-3.0.21-arm64.dmg - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/vlc-3.0.21-arm64.dmg) + file(DOWNLOAD + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg + ${CMAKE_BINARY_DIR}/vlc-3.0.21-arm64.dmg + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/vlc-3.0.21-arm64.dmg) file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) execute_process( @@ -21,10 +23,12 @@ if (USESYSTEMLIBS) ) else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) - file(DOWNLOAD - https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg - ${CMAKE_BINARY_DIR}/vlc-3.0.21-intel64.dmg - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/vlc-3.0.21-intel64.dmg) + file(DOWNLOAD + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg + ${CMAKE_BINARY_DIR}/vlc-3.0.21-intel64.dmg + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/vlc-3.0.21-intel64.dmg) file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) execute_process( diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 62d5c558ac..a47c59c96b 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -18,10 +18,12 @@ endif (NOT USESYSTEMLIBS) if (${LINUX_DISTRO} MATCHES fedora 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) - file(DOWNLOAD - https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz - ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz - ) + 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} diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 75f39ce8bc..d2c9d95c9b 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -15,10 +15,12 @@ elseif (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES Fr endif (NOT USESYSTEMLIBS) if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) - file(DOWNLOAD - https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz - ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz) + file(DOWNLOAD + https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz + ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz) file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz DESTINATION ${CMAKE_BINARY_DIR} diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index cb26a7b1b8..4df54e2b59 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -19,19 +19,23 @@ use_prebuilt_binary(nanosvg) elseif (${LINUX_DISTRO} MATCHES debian OR DARWIN) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) if (DARWIN) - file(DOWNLOAD - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 - ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2) + file(DOWNLOAD + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 + ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2) file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2 DESTINATION ${LIBS_PREBUILT_DIR} ) else (DARWIN) - file(DOWNLOAD - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115397/993664/nanosvg-2022.09.27-linux-580337.tar.bz2 - ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2) + file(DOWNLOAD + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115397/993664/nanosvg-2022.09.27-linux-580337.tar.bz2 + ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2) file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-linux-580337.tar.bz2 DESTINATION ${LIBS_PREBUILT_DIR} diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index b9a3ac1c14..c49fe6bc9a 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -9,10 +9,12 @@ use_system_binary( xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed OR NOT ${xmlrpc-epi_installed} EQUAL 0)) - file(DOWNLOAD - https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 - ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 - ) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2) + file(DOWNLOAD + https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 + ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2) file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2 DESTINATION ${CMAKE_BINARY_DIR} diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 3c8c8031f2..3cf12408b4 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -297,10 +297,12 @@ target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/sse2neon) - file(DOWNLOAD - https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h - ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h - ) + if (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h) + file(DOWNLOAD + https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h + ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h + ) + endif (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/sse2neon/sse2neon.h) file(WRITE ${PREBUILD_TRACKING_DIR}/sse2neon_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/sse2neon_installed OR NOT ${sse2neon_installed} EQUAL 0) target_include_directories(llcommon PUBLIC ${LIBS_PREBUILT_DIR}/include/sse2neon) -- cgit v1.2.3 From f2e44f5ab0d57eea0e145f5da094527f0e39dae3 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 14 Aug 2024 17:54:36 +0800 Subject: Automatic libcurl download, build & install The MacPorts openssl11 port is not needed any more for building our libcurl. --- README.md | 29 +-------------- indra/cmake/CURL.cmake | 98 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index a5c6a3a656..a9bb45dca0 100644 --- a/README.md +++ b/README.md @@ -34,27 +34,7 @@ $ cd viewer ### macOS ``` -$ sudo port install cmake pkgconfig autoconf automake libtool apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib -$ mkdir -p build/universal-apple-darwin`uname -r`/packages -$ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -$ cd - -$ cd .. -$ git clone https://github.com/secondlife/3p-curl -$ cd 3p-curl/curl -$ mkdir -p build/aarch64-apple-darwin`uname -r` -$ cd build/aarch64-apple-darwin`uname -r` -$ export CFLAGS="-arch arm64 -mmacosx-version-min=11.0 -std=c90" -$ sudo port deactivate openssl3 -$ ../../configure --host=aarch64-apple-darwin`uname -r` --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=/opt/local/libexec/openssl11 --without-libidn2 --without-libpsl -$ make -j`sysctl -n hw.ncpu` -$ sudo port activate openssl3 -$ unset CFLAGS -$ cd ../../../../viewer/build/universal-apple-darwin`uname -r`/packages -$ tar xf ~/Downloads/curl-7.54.1-513145c-darwin64-513145c.tar.zst -$ cd lib/release -$ lipo ../../../../../../3p-curl/curl/build/aarch64-apple-darwin`uname -r`/lib/.libs/libcurl.a libcurl.a -create -output libcurl.a -$ cd ../../.. +$ sudo port install cmake pkgconfig autoconf automake libtool apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal uriparser +universal libvorbis +universal xxhashlib $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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 -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra $ make -j`sysctl -n hw.ncpu` @@ -65,13 +45,6 @@ $ open newview/Megapahit.app ### GNU/Linux ``` -$ mkdir -p build/`uname -m`-linux-gnu/packages -$ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-linux64-513145c.tar.zst -$ cd - -$ cd build/`uname -m`-linux-gnu/packages -$ tar xf ~/Downloads/curl-7.54.1-513145c-linux64-513145c.tar.zst -$ cd .. $ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" ``` diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index d47e2a765c..5efa9b61b0 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -4,8 +4,102 @@ include(Prebuilt) include_guard() add_library( ll::libcurl INTERFACE IMPORTED ) -#use_system_binary(libcurl) -#use_prebuilt_binary(curl) +if (NOT USESYSTEMLIBS) +use_system_binary(libcurl) +endif (NOT USESYSTEMLIBS) +if (LINUX OR NOT USESYSTEMLIBS) +use_prebuilt_binary(curl) +elseif (${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 + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} + ) + file( + COPY + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/curl.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/curlbuild.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/curlrules.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/curlver.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/easy.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/mprintf.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/multi.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/stdcheaders.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/system.h + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/typecheck-gcc.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/curl + ) + file( + COPY + ${LIBS_PREBUILT_DIR}/lib/release/libcrypto.a + ${LIBS_PREBUILT_DIR}/lib/release/libssl.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib + ) + message("We need to temporarily have OpenSSL3 header directory and libraries renamed just until the libcurl building process with OpenSSL1.1 now is finished.") + if (DARWIN) + set(ENV{CFLAGS} "-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.15 -std=c90") + execute_process(COMMAND sudo mv /opt/local/include/openssl /opt/local/include/openssl3) + execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.a /opt/local/lib/libcrypto.a.3) + execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.dylib /opt/local/lib/libcrypto.dylib.3) + execute_process(COMMAND sudo mv /opt/local/lib/libssl.a /opt/local/lib/libssl.a.3) + execute_process(COMMAND sudo mv /opt/local/lib/libssl.dylib /opt/local/lib/libssl.dylib.3) + if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND ./configure --host=aarch64-apple-darwin --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl + ) + else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND ./configure --host=${CMAKE_OSX_ARCHITECTURES}-apple-darwin --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl + ) + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + else (DARWIN) + execute_process(COMMAND sudo mv /usr/include/openssl /usr/include/openssl3) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.a /usr/lib/libcrypto.a.3) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.so /usr/lib/libcrypto.so.3) + execute_process(COMMAND sudo mv /usr/lib/libssl.a /usr/lib/libssl.a.3) + execute_process(COMMAND sudo mv /usr/lib/libssl.so /usr/lib/libssl.so.3) + execute_process( + COMMAND ./configure --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl + ) + endif (DARWIN) + execute_process( + COMMAND make -j${MAKE_JOBS} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl + RESULT_VARIABLE curl_installed + ) + file( + COPY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/lib/.libs/libcurl.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + ) + if (DARWIN) + unset(ENV{CFLAGS}) + execute_process(COMMAND sudo mv /opt/local/include/openssl3 /opt/local/include/openssl) + execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.a.3 /opt/local/lib/libcrypto.a) + execute_process(COMMAND sudo mv /opt/local/lib/libcrypto.dylib.3 /opt/local/lib/libcrypto.dylib) + execute_process(COMMAND sudo mv /opt/local/lib/libssl.a.3 /opt/local/lib/libssl.a) + execute_process(COMMAND sudo mv /opt/local/lib/libssl.dylib.3 /opt/local/lib/libssl.dylib) + else (DARWIN) + execute_process(COMMAND sudo mv /usr/include/openssl3 /usr/include/openssl) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.a.3 /usr/lib/libcrypto.a) + execute_process(COMMAND sudo mv /usr/lib/libcrypto.so.3 /usr/lib/libcrypto.so) + execute_process(COMMAND sudo mv /usr/lib/libssl.a.3 /usr/lib/libssl.a) + execute_process(COMMAND sudo mv /usr/lib/libssl.so.3 /usr/lib/libssl.so) + endif (DARWIN) + message("OpenSSL3 header directory and library names have been restored.") + file(REMOVE + ${LIBS_PREBUILT_DIR}/lib/libcrypto.a + ${LIBS_PREBUILT_DIR}/lib/libssl.a + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/curl_installed "${curl_installed}") +endif (LINUX OR NOT USESYSTEMLIBS) if (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.lib) else (WINDOWS) -- cgit v1.2.3 From b3cba946d9195b8f9e188c65997cce7ecd9f0666 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 14 Aug 2024 18:57:34 +0800 Subject: Build instructions now use 1-level deep build dir --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a9bb45dca0..8d86ab3689 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ As a third party maintained fork, which includes Apple Silicon native builds, Me ``` $ git clone git://megapahit.org/viewer.git $ cd viewer +$ mkdir build-`uname -s|tr [:upper:] [:lower:]`-`uname -m` +$ cd build-`uname -s|tr [:upper:] [:lower:]`-`uname -m` ``` ### macOS @@ -36,7 +38,7 @@ $ cd viewer ``` $ sudo port install cmake pkgconfig autoconf automake libtool apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal uriparser +universal libvorbis +universal xxhashlib $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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 -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../indra $ make -j`sysctl -n hw.ncpu` $ make install $ open newview/Megapahit.app @@ -52,7 +54,7 @@ $ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ 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 -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -63,7 +65,7 @@ $ megapahit ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ 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 -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -74,7 +76,7 @@ $ megapahit ``` $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-devel xxhash-devel -$ 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 -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -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 @@ -88,7 +90,7 @@ $ setenv LL_BUILD "-O3 -std=c++17 -fPIC" $ sudo su - # portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/collada-dom x11-toolkits/fltk textproc/hunspell misc/meshoptimizer graphics/nanosvg graphics/openjpeg devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis net/xmlrpc-epi devel/xxhash # exit -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -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:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -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 -- cgit v1.2.3 From 42013d38d13b4444196792d31996b688fa3ad9a6 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 14 Aug 2024 19:30:49 +0800 Subject: Use LL's NanoSVG for Ubuntu too so we can have 1 set of instructions that applies to both Debian and Ubuntu. --- README.md | 23 ++++------------------- indra/cmake/ViewerMiscLibs.cmake | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 8d86ab3689..ffa95f8a58 100644 --- a/README.md +++ b/README.md @@ -44,16 +44,11 @@ $ make install $ open newview/Megapahit.app ``` -### GNU/Linux - -``` -$ export LL_BUILD="-O3 -std=c++17 -fPIC -DLL_LINUX=1" -``` - -#### Debian 12.5 +### Debian/Ubuntu ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-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 -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 @@ -61,21 +56,11 @@ $ sudo apt install megapahit-`cat newview/viewer_version.txt`-Linux.deb $ megapahit ``` -#### Ubuntu 24.04 - -``` -$ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-dev libxxhash-dev -$ 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 -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 -$ megapahit -``` - -#### Fedora +### Fedora ``` $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-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 -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 diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 4df54e2b59..c3dcf1ddb2 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -16,7 +16,7 @@ if (NOT USESYSTEMLIBS) use_prebuilt_binary(slvoice) use_prebuilt_binary(nanosvg) -elseif (${LINUX_DISTRO} MATCHES debian OR DARWIN) +elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR DARWIN) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/nanosvg_installed OR NOT ${nanosvg_installed} EQUAL 0) if (DARWIN) if (NOT EXISTS ${CMAKE_BINARY_DIR}/nanosvg-2022.09.27-darwin64-580364.tar.bz2) -- cgit v1.2.3 From a852e0b8908762429fb1f8ee8b817f516f02903e Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 14 Aug 2024 19:37:02 +0800 Subject: macOS build process is for 1 arch at a time now --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffa95f8a58..2cc3e1ef13 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 autoconf automake libtool apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal uriparser +universal libvorbis +universal xxhashlib $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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 -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING=`uname -m` -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../indra $ make -j`sysctl -n hw.ncpu` $ make install $ open newview/Megapahit.app -- cgit v1.2.3 From d831010b59d83fccc64d00c48d13447bfcbb7bcd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Wed, 14 Aug 2024 19:43:02 +0800 Subject: Set ROOT_PROJECT_NAME to Megapahit now to make it more flexible in case we want to use a different string for the viewer channel, such as "Megapahit Viewer Release" or the likes. --- README.md | 8 ++++---- indra/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2cc3e1ef13..f343813f8c 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 autoconf automake libtool apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal uriparser +universal libvorbis +universal xxhashlib $ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -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 -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING=`uname -m` -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../indra +$ 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=OFF -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING=`uname -m` ../indra $ make -j`sysctl -n hw.ncpu` $ make install $ open newview/Megapahit.app @@ -49,7 +49,7 @@ $ open newview/Megapahit.app ``` $ sudo apt install pkg-config libaprutil1-dev libboost-fiber-dev libboost-program-options-dev libboost-regex-dev libcollada-dom-dev libexpat1-dev libfltk1.3-dev libglu1-mesa-dev libhunspell-dev libjsoncpp-dev libmeshoptimizer-dev libnghttp2-dev libpipewire-0.3-dev libsdl2-dev liburiparser-dev libvlc-dev libvlccore-dev libvorbis-dev libxmlrpc-epi-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 -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: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 $ make -j`nproc` $ cpack -G DEB $ sudo apt install megapahit-`cat newview/viewer_version.txt`-Linux.deb @@ -61,7 +61,7 @@ $ megapahit ``` $ sudo dnf install gcc-c++ patchelf apr-util-devel boost-devel collada-dom-devel expat-devel fltk-devel mesa-libGLU-devel hunspell-devel jsoncpp-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel xmlrpc-epi-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 -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: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 $ make -j`nproc` $ cpack -G RPM $ sudo rpm -i megapahit-`cat newview/viewer_version.txt`-Linux.rpm @@ -75,7 +75,7 @@ $ setenv LL_BUILD "-O3 -std=c++17 -fPIC" $ sudo su - # portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/collada-dom x11-toolkits/fltk textproc/hunspell misc/meshoptimizer graphics/nanosvg graphics/openjpeg devel/sdl20 net/uriparser multimedia/vlc audio/libvorbis net/xmlrpc-epi devel/xxhash # exit -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -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: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 $ make -j`nproc` $ sudo cpack -G FREEBSD $ sudo pkg add megapahit-`cat newview/viewer_version.txt`-FreeBSD.pkg diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index d37bd7f4b9..154d83a640 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -12,7 +12,7 @@ # "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) -set(ROOT_PROJECT_NAME "Megapahit" CACHE STRING +set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") project(${ROOT_PROJECT_NAME}) -- cgit v1.2.3