Skip to content

Commit

Permalink
Set LIB_INSTALL_DIR for cmake-based projects (JuliaLang#18047)
Browse files Browse the repository at this point in the history
* Set LIB_INSTALL_DIR for cmake-based projects

This fixes `MULTIARCH_INSTALL=1` installations that place libraries not
into `<prefix>/lib` but into `<prefix>/lib/<host-triplet>`, like Debian
and Ubuntu.  Without this change, `libgit2`, `libssh2` and `mbedtls`
would place libraries into `<prefix>/lib`, silently failing until the
Julia bootstrap process attempted to dlopen one of them.

* Apply `LIB_INSTALL_DIR` to `CMAKE_COMMON`
  • Loading branch information
staticfloat authored and tkelman committed Aug 18, 2016
1 parent 68ba177 commit 1af5356
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deps/libssh2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1af5356

Please sign in to comment.