From 81e3e060da9c575e76abba1e4d61f3c21998a536 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Mon, 25 Jan 2016 13:42:00 -0800 Subject: [PATCH] cmake: use GNUInstallDirs to setup the install paths GNUInstallDirs provides variables for the bin/, lib64/, etc. paths. Use the CMAKE_INSTALL_LIBDIR that is provided by GNUInstallDirs rather than calculating our own value. --- CMakeLists.txt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4d6144a..669b6ccc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,14 +44,7 @@ SET( ${PROJECT_NAME}_MAJOR_VERSION 0 ) SET( ${PROJECT_NAME}_MINOR_VERSION 1 ) SET( ${PROJECT_NAME}_PATCH_LEVEL 0 ) -# output executable and library path -# The library directory is configured by setting CMAKE_INSTALL_LIBDIR. -# Otherwise, the defaults set here are used. -IF(EXISTS "/usr/lib64" AND NOT IS_SYMLINK "/usr/lib64") - SET(CMAKE_INSTALL_LIBDIR "lib64" CACHE STRING "Library Directory Basename") -ELSE() - SET(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library Directory Basename") -ENDIF() +include(GNUInstallDirs) ## Setup platform specific helper defines build variants IF(WIN32) @@ -113,5 +106,3 @@ ADD_SUBDIRECTORY (src/tools) ADD_SUBDIRECTORY (src/py) ADD_SUBDIRECTORY (src/tests) ADD_SUBDIRECTORY (src/doc) - -