From 16b6fcf80786f10f9dba74c7c151ecff25662aa8 Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Wed, 6 Apr 2016 12:49:16 -0700 Subject: [PATCH] cmake: set CMAKE_INSTALL_LIBDIR before using it Signed-off-by: Mihai Tudor Panu --- CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7087b35..2fda89a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,15 +15,10 @@ message (INFO " found mraa version: ${MRAA_VERSION}") # Appends the cmake/modules path to MAKE_MODULE_PATH variable. set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) -# Older cmake might not pick CMAKE_INSTALL_LIBDIR right -if (CMAKE_INSTALL_LIBDIR) - set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries") -else () - set (LIB_INSTALL_DIR "lib" CACHE PATH "Installation path for libraries") -endif () -# Set CMAKE_LIB_INSTALL_DIR if not defined +# Set CMAKE_INSTALL_LIBDIR if not defined include(GNUInstallDirs) +set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries") # Make a version file containing the current version from git. include (GetGitRevisionDescription)