aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindLpeg.cmake6
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})