mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
cmake: Canonicalize binary dir
This would otherwise fail to set $fish_function_path to share/functions etc if run through a symlink.
This commit is contained in:
parent
7c5777a82a
commit
35baa88334
1 changed files with 4 additions and 1 deletions
|
@ -59,9 +59,12 @@ if(DEFINED WITH_GETTEXT AND NOT "${WITH_GETTEXT}")
|
|||
set(CMAKE_WITH_GETTEXT "0")
|
||||
endif()
|
||||
|
||||
# CMAKE_BINARY_DIR can include symlinks, since we want to compare this to the dir fish is executed in we need to canonicalize it.
|
||||
file(REAL_PATH "${CMAKE_BINARY_DIR}" fish_binary_dir)
|
||||
|
||||
# Tell Cargo where our build directory is so it can find config.h.
|
||||
corrosion_set_env_vars(${fish_rust_target}
|
||||
"FISH_BUILD_DIR=${CMAKE_BINARY_DIR}"
|
||||
"FISH_BUILD_DIR=${fish_binary_dir}"
|
||||
"FISH_AUTOCXX_GEN_DIR=${fish_autocxx_gen_dir}"
|
||||
"FISH_RUST_TARGET_DIR=${rust_target_dir}"
|
||||
"PREFIX=${CMAKE_INSTALL_PREFIX}"
|
||||
|
|
Loading…
Reference in a new issue