From 55fb48d04d4c59b3ac93a1e2b0884d4dc5d373f8 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Mon, 12 Aug 2019 18:19:27 -0700 Subject: [PATCH] GH-533: use consistent "lib" install dir Previously, some sub-projects, like binpac, use GNUInstallDirs.cmake to choose the default name of the library install directory while others hard-code "lib" as the default. The former may pick "lib64" on some platforms, so for now, when installing such sub-projects as part of Zeek, it's overridden to consistently be "lib". --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91d6e4220d..a6c18ad693 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,15 @@ project(Zeek C CXX) # aux/zeek-aux/plugin-support/skeleton/CMakeLists.txt cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +if ( NOT CMAKE_INSTALL_LIBDIR ) + # Currently, some sub-projects may use GNUInstallDirs.cmake to choose the + # library install dir, while others just default to "lib". For sake of + # consistency, this just overrides the former to always use "lib" in case + # it would have chosen something else, like "lib64", but a thing for the + # future may be to standardize all sub-projects to use GNUInstallDirs. + set(CMAKE_INSTALL_LIBDIR lib) +endif () + include(cmake/CommonCMakeConfig.cmake) ########################################################################