From 678d2453ef766977e029c1b969e3e2af2d322612 Mon Sep 17 00:00:00 2001 From: Philip Rinn Date: Mon, 17 Jan 2011 00:39:04 +0100 Subject: [PATCH] Respect CMAKE_INSTALL_LIBDIR if set --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca774a4e4..6e5fcb9b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,12 @@ if (NOT DEFINED LIBDIR) if (WIN32 OR APPLE) set (LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/release) else (WIN32 OR APPLE) - set (LIBDIR ${CMAKE_INSTALL_PREFIX}/lib) + # Respect CMAKE_INSTALL_LIBDIR if set + if (DEFINED CMAKE_INSTALL_LIBDIR) + set (LIBDIR ${CMAKE_INSTALL_LIBDIR}) + else (DEFINED CMAKE_INSTALL_LIBDIR) + set (LIBDIR ${CMAKE_INSTALL_PREFIX}/lib) + endif (DEFINED CMAKE_INSTALL_LIBDIR) endif (WIN32 OR APPLE) endif (NOT DEFINED LIBDIR)