From 1af5356a301f671ab57ff5f534a00c7eca96435a Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 17 Aug 2016 23:43:57 -0700 Subject: [PATCH] Set LIB_INSTALL_DIR for cmake-based projects (#18047) * Set LIB_INSTALL_DIR for cmake-based projects This fixes `MULTIARCH_INSTALL=1` installations that place libraries not into `/lib` but into `/lib/`, like Debian and Ubuntu. Without this change, `libgit2`, `libssh2` and `mbedtls` would place libraries into `/lib`, silently failing until the Julia bootstrap process attempted to dlopen one of them. * Apply `LIB_INSTALL_DIR` to `CMAKE_COMMON` --- deps/Makefile | 2 +- deps/libssh2.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 37b4defd90884..1b799d922aaee 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -46,7 +46,7 @@ CONFIGURE_COMMON += F77="$(FC)" CC="$(CC) $(DEPS_CFLAGS)" CXX="$(CXX) $(DEPS_CXX CMAKE_CC_ARG := $(CC_ARG) $(DEPS_CFLAGS) CMAKE_CXX_ARG := $(CXX_ARG) $(DEPS_CXXFLAGS) -CMAKE_COMMON := -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DCMAKE_PREFIX_PATH=$(build_prefix) +CMAKE_COMMON := -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DCMAKE_PREFIX_PATH=$(build_prefix) -DLIB_INSTALL_DIR=$(build_shlibdir) ifneq ($(VERBOSE), 0) CMAKE_COMMON += -DCMAKE_VERBOSE_MAKEFILE=ON endif diff --git a/deps/libssh2.mk b/deps/libssh2.mk index be13f58c8653e..eb2282a882e12 100644 --- a/deps/libssh2.mk +++ b/deps/libssh2.mk @@ -8,7 +8,7 @@ LIBSSH2_OBJ_SOURCE := $(BUILDDIR)/$(LIBSSH2_SRC_DIR)/src/libssh2.$(SHLIB_EXT) LIBSSH2_OBJ_TARGET := $(build_shlibdir)/libssh2.$(SHLIB_EXT) LIBSSH2_OPTS := $(CMAKE_COMMON) -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib + -DCMAKE_BUILD_TYPE=Release ifeq ($(OS),WINNT) LIBSSH2_OPTS += -DCRYPTO_BACKEND=WinCNG -DENABLE_ZLIB_COMPRESSION=OFF