From: Rossen Apostolov Date: Mon, 26 May 2014 08:42:29 +0000 (+0200) Subject: Install libraries in correct directories on multiarch systems. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=d5c5abd9aa19fe7f5be442defca548576cac4fc5;p=alexxy%2Fgromacs.git Install libraries in correct directories on multiarch systems. NB: this patch may change the default install dirs on some systems, and will _not_ overwrite previous installations. Thus make sure to link to the correct library versions of e.g. libgromacs. Fixes #591 and #623. Change-Id: Ibd1d7d216236a0f5841ba9f0ac622a3f8f1a8718 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c06b624831..27e23ff1c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -780,8 +780,11 @@ set(PKG_CFLAGS "${PKG_CFLAGS} ${OpenMP_C_FLAGS}") ######################################################################## # Specify install locations ######################################################################## -set(GMX_LIB_INSTALL_DIR lib CACHE STRING - "Library installation directory (default: lib)") +# Use GNUInstallDirst to set paths on multiarch systems +include(GNUInstallDirs) + +set(GMX_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING + "Library installation directory (default: ${CMAKE_INSTALL_LIBDIR})") set(GMX_DATA_INSTALL_DIR gromacs CACHE STRING "Data installation directory under share/ (default: gromacs)") mark_as_advanced(GMX_LIB_INSTALL_DIR GMX_DATA_INSTALL_DIR)