build: fix uncrustify install in nix devShell (#33020)

running "make format" from the nix devShell defined at https://github.com/nix-community/neovim-nightly-overlay/
failed with:
```
Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:52 (file):
  file INSTALL cannot find "/home/teto/neovim/build/usr/bin/uncrustify": No
  such file or directory.
```

Turns out the following uncrustify (probably cmake-generated) check:
```
   file(RPATH_CHECK
        FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/uncrustify"
        RPATH "")
```
would remove the executable when RPATH was non-empty.
I dont think it's much of an issue here as it's not an executable
supposed to be installed so seeing paths referenced in rpath getting removed should not be a concern
(which I beleive is the reason for the  check).
This commit is contained in:
Matthieu Coudron
2025-03-24 22:15:22 +01:00
committed by GitHub
parent 76eca62137
commit 5719f2b91a

View File

@ -304,6 +304,7 @@ ExternalProject_Add(uncrustify
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/uncrustify
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
-D CMAKE_RUNTIME_OUTPUT_DIRECTORY=${DEPS_BIN_DIR}
-D CMAKE_SKIP_RPATH=true
EXCLUDE_FROM_ALL TRUE
${EXTERNALPROJECT_OPTIONS})