]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: install python packages into $CMAKE_INSTALL_PREFIX
authorKefu Chai <kchai@redhat.com>
Mon, 4 Jul 2016 03:10:49 +0000 (11:10 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 4 Jul 2016 03:49:26 +0000 (11:49 +0800)
* Distutils.cmake:
  set --prefix=${CMAKE_INSTALL_PREFIX} for python packages installed using
  setuptools. it was set to --prefix=/user only when $DESTDIR is set. so
  if user installs ceph using -DCMAKE_INSTALL_PREFIX, these python
  packages still go to /usr, which is unexpected.
* ceph-disk/CMakeLists.txt:
  install script into ${CMAKE_INSTALL_SBINDIR} instead of /usr/sbin

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Distutils.cmake
src/ceph-disk/CMakeLists.txt

index 07e6a0ff50a526fb9a92abe95ce9073639f2b114..7394ac6ce83b54da14f752514db211cd534a2643 100644 (file)
@@ -13,12 +13,10 @@ function(distutils_install_module name)
     DEPENDS ${py_clone})
   cmake_parse_arguments(DU "" INSTALL_SCRIPT "" ${ARGN})
   install(CODE "
-    set(options)
+    set(options --prefix=${CMAKE_INSTALL_PREFIX})
     if(DEFINED ENV{DESTDIR})
       if(EXISTS /etc/debian_version)
         list(APPEND options --install-layout=deb)
-      else()
-        list(APPEND options --prefix=/usr)
       endif()
       list(APPEND options --root=\$ENV{DESTDIR})
       if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
index a7a7a3376feb922657bbac841d3baa467fc10945..c57ef446cf1f12d6b3ed45611324cc55f975b03b 100644 (file)
@@ -9,4 +9,4 @@ add_custom_target(ceph-disk
 
 include(Distutils)
 distutils_install_module(ceph_disk
-  INSTALL_SCRIPT /usr/sbin)
+  INSTALL_SCRIPT ${CMAKE_INSTALL_FULL_SBINDIR})