From dc64570008e7b1dbbcda88d6e000808cfb52dcaa Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Sun, 19 Oct 2025 15:45:45 +0200 Subject: cmake: Set CMAKE_INSTALL_LIBDIR explicitly CMake and Meson may disagree on the default value of the libdir installation path. This results in shared libraries installed in the default location not assigned to the {libdir_shared} install location by the Meson CMake interpreter. This results in wrong install plan metadata and in those libraries being installed in the wrong location. Fixes #12960. --- mesonbuild/cmake/interpreter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index 17c076e69..bdaa6d54c 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -842,6 +842,8 @@ class CMakeInterpreter: cmake_args = [] cmake_args += cmake_get_generator_args(self.env) cmake_args += [f'-DCMAKE_INSTALL_PREFIX={self.install_prefix}'] + libdir = self.env.coredata.optstore.get_value_for(OptionKey('libdir')) + cmake_args += [f'-DCMAKE_INSTALL_LIBDIR={libdir}'] cmake_args += extra_cmake_options if not any(arg.startswith('-DCMAKE_BUILD_TYPE=') for arg in cmake_args): # Our build type is favored over any CMAKE_BUILD_TYPE environment variable -- cgit v1.2.3