diff options
| author | Daniele Nicolodi <daniele@grinta.net> | 2025-10-19 15:45:45 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-24 08:13:21 -0700 |
| commit | dc64570008e7b1dbbcda88d6e000808cfb52dcaa (patch) | |
| tree | 0c522cf7207ae699d7044d120c24cd49d812b22b | |
| parent | a907c66cf93b1ded17aebd1ac35a1096d2866cf8 (diff) | |
| download | meson-dc64570008e7b1dbbcda88d6e000808cfb52dcaa.tar.gz | |
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.
| -rw-r--r-- | mesonbuild/cmake/interpreter.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
