Skip to content

Commit

Permalink
cmake: use GNUInstallDirs to setup the install paths
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davvid committed Jan 25, 2016
1 parent 519d034 commit 81e3e06
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -113,5 +106,3 @@ ADD_SUBDIRECTORY (src/tools)
ADD_SUBDIRECTORY (src/py)
ADD_SUBDIRECTORY (src/tests)
ADD_SUBDIRECTORY (src/doc)


0 comments on commit 81e3e06

Please sign in to comment.