diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-04-07 11:52:31 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-04-07 12:09:57 +0800 |
commit | 415bfb74fd52b200f21031e78a4ca9fd5e595978 (patch) | |
tree | bac1499db77e8ecd4b484a1cdd4904d277e0b42e | |
parent | b7f21024384416f2491ab980ea711fa5d24b7c91 (diff) |
Fix logics for using prebuilt or system GLM
Since the last merge, the prebuilt version has been used for all
Megapahit platforms, when some should've used the system version instead,
as instructed.
And then, not all Linux distros don't have sufficient version of GLM on
their repos, some do have and have already been instructed to install
system GLM anyway.
So the distros that still have insufficient version of GLM (0.9.9.8
instead of the necessary 1.0.1) are Debian, Ubuntu and openSUSE
Tumbleweed, while other distros and OSes have GLM 1.0.1.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | indra/cmake/GLM.cmake | 6 | ||||
-rw-r--r-- | indra/llcommon/CMakeLists.txt | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -55,7 +55,7 @@ $ megapahit ### Fedora ``` -$ sudo dnf install cmake gcc-c++ patch patchelf rpm-build apr-util-devel boost-devel boost-url expat-devel fltk-devel mesa-libGLU-devel hunspell-devel minizip-ng-compat-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel libXcursor-devel libXfixes-devel libXinerama-devel xxhash-devel +$ sudo dnf install cmake gcc-c++ patch patchelf rpm-build apr-util-devel boost-devel boost-url expat-devel fltk-devel glm-devel mesa-libGLU-devel hunspell-devel minizip-ng-compat-devel libnghttp2-devel nanosvg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel uriparser-devel vlc-devel libvorbis-devel libXcursor-devel libXfixes-devel libXinerama-devel xxhash-devel $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra $ make -j`nproc` diff --git a/indra/cmake/GLM.cmake b/indra/cmake/GLM.cmake index 451b7292cb..d411c049ec 100644 --- a/indra/cmake/GLM.cmake +++ b/indra/cmake/GLM.cmake @@ -5,10 +5,10 @@ add_library( ll::glm INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary( glm ) -elseif (NOT LINUX) +elseif (NOT (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed))) find_package( glm REQUIRED ) endif (NOT USESYSTEMLIBS) -if (LINUX OR USESYSTEMLIBS) +if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR NOT USESYSTEMLIBS) use_prebuilt_binary(glm) -endif (LINUX OR USESYSTEMLIBS) +endif () diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 8e56e6a800..521a1b3ced 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -300,7 +300,7 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) 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) -elseif (LINUX) +elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) target_include_directories(llcommon PUBLIC ${LIBS_PREBUILT_DIR}/include) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) |