diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-30 23:57:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-30 23:57:15 +0200 |
commit | 9f9cef1b569e226a87c5c74e455bc4fc76cc2fac (patch) | |
tree | 9d1dab712b9b7f4adf1d309aa4a198cf3576d75a /cmake | |
parent | 066db5e7cdaadfb1d2971bdc4b9200f14737d7b6 (diff) | |
download | rneovim-9f9cef1b569e226a87c5c74e455bc4fc76cc2fac.tar.gz rneovim-9f9cef1b569e226a87c5c74e455bc4fc76cc2fac.tar.bz2 rneovim-9f9cef1b569e226a87c5c74e455bc4fc76cc2fac.zip |
build: make lpeg an imported library
Cmake truncates the full link path to a shared library if it is missing
an SONAME in some undocumented scenarios. This causes builds in some
systems to fail if "lpeg" isn't a library on the system path.
The path of imported libraries aren't modified by cmake, so we can use
that as a workaround until a proper solution for this has been
identified.
Closes https://github.com/neovim/neovim/issues/23395.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindLpeg.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/FindLpeg.cmake b/cmake/FindLpeg.cmake index d4fc6dbd97..4354f815b5 100644 --- a/cmake/FindLpeg.cmake +++ b/cmake/FindLpeg.cmake @@ -10,5 +10,7 @@ ubuntu() find_package_handle_standard_args(Lpeg DEFAULT_MSG LPEG_LIBRARY) mark_as_advanced(LPEG_LIBRARY) -add_library(lpeg INTERFACE) -target_link_libraries(lpeg INTERFACE ${LPEG_LIBRARY}) +# Workaround: use an imported library to prevent cmake from modifying library +# link path. See #23395. +add_library(lpeg UNKNOWN IMPORTED) +set_target_properties(lpeg PROPERTIES IMPORTED_LOCATION ${LPEG_LIBRARY}) |