commit 5719f2b91a3100785c8b454e28054b5c7848271d
parent 76eca621374b7d19604c820d8ebaefb184de1fc9
Author: Matthieu Coudron <886074+teto@users.noreply.github.com>
Date: Mon, 24 Mar 2025 22:15:22 +0100
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).
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -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})