summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Alexeyev <akari@taisei-project.org>2020-11-12 22:59:42 +0200
committerGitHub <noreply@github.com>2020-11-12 12:59:42 -0800
commitd239a265b95ee75d610e795861390eb57accea58 (patch)
treed6e763e4182dbc726e34382ea5f08052f4e5c622
parentc48433eb9c24bf51ae24fbe646fc4719ea88e746 (diff)
downloadbinaryen-d239a265b95ee75d610e795861390eb57accea58.tar.gz
binaryen-d239a265b95ee75d610e795861390eb57accea58.tar.bz2
binaryen-d239a265b95ee75d610e795861390eb57accea58.zip
build/linux: more correct rpath handling (#3331)
Don't hardcode `lib`, it's incorrect for many systems (e.g. `lib64` is common on some x86_64 distros like openSUSE). Use CMAKE_INSTALL_LIBDIR instead.
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 784fbcd64..d879e86d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,7 +82,7 @@ function(binaryen_setup_rpath name)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
set(_install_rpath "@loader_path/../lib")
elseif(UNIX)
- set(_install_rpath "\$ORIGIN/../lib")
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
set_property(TARGET ${name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-z,origin ")