From a07e56e1a2e70a9b81eb0a65f345cf45a7a93a81 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 19 Dec 2019 21:56:23 -0800
Subject: [PATCH] DefineInstallationPaths.cmake: Define libdir in terms of
 LIB_SUFFIX

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 build/cmake/DefineInstallationPaths.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/build/cmake/DefineInstallationPaths.cmake
+++ b/build/cmake/DefineInstallationPaths.cmake
@@ -26,11 +26,11 @@
     set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The library install dir (default: lib${LIB_SUFFIX})")
 endif()
 set(INCLUDE_INSTALL_DIR "include" CACHE PATH "The library install dir (default: include)")
-set(CMAKE_INSTALL_DIR "lib/cmake" CACHE PATH "The subdirectory to install cmake config files (default: cmake)")
-set(PKGCONFIG_INSTALL_DIR "lib/pkgconfig" CACHE PATH "The subdirectory to install pkgconfig config files (default: lib/pkgconfig)")
+set(CMAKE_INSTALL_DIR "lib${LIB_SUFFIX}/cmake" CACHE PATH "The subdirectory to install cmake config files (default: cmake)")
+set(PKGCONFIG_INSTALL_DIR "lib${LIB_SUFFIX}/pkgconfig" CACHE PATH "The subdirectory to install pkgconfig config files (default: lib/pkgconfig)")
 set(DOC_INSTALL_DIR "share/doc" CACHE PATH "The subdirectory to install documentation files (default: share/doc)")
 set(prefix "${CMAKE_INSTALL_PREFIX}")
 set(exec_prefix "${CMAKE_INSTALL_PREFIX}/bin")
-set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
+set(libdir "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
 set(includedir "${CMAKE_INSTALL_PREFIX}/include")
 set(cmakedir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DIR}")
--- a/build/cmake/DefineCMakeDefaults.cmake
+++ b/build/cmake/DefineCMakeDefaults.cmake
@@ -44,8 +44,8 @@
 # top of the build tree rather than in hard-to-find leaf
 # directories. This simplifies manual testing and the use of the build
 # tree rather than installed thrift libraries.
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX})
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX})
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 
 #
