From: Kefu Chai Date: Fri, 15 Feb 2019 12:14:53 +0000 (+0800) Subject: cmake: install mgr plugins into $prefix/share/ceph X-Git-Tag: v14.1.0~89^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a788dac0150bb64d5145a7278381b512e275f87;p=ceph-ci.git cmake: install mgr plugins into $prefix/share/ceph as mgr plugins are architecture independent source files. see also /usr/share/cmake-*/ Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3f7123f5451..3031524230d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,6 +4,8 @@ include(GNUInstallDirs) # for erasure and compressor plugins set(CMAKE_INSTALL_PKGLIBDIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}) set(CMAKE_INSTALL_FULL_PKGLIBDIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}) +# for mgr plugins +set(CEPH_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}) # so libceph-common can be found set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) if(NOT CMAKE_INSTALL_RPATH) @@ -17,7 +19,7 @@ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) set(sysconfdir ${CMAKE_INSTALL_FULL_SYSCONFDIR}) set(libexecdir ${CMAKE_INSTALL_FULL_LIBEXECDIR}) set(pkgdatadir ${CMAKE_INSTALL_FULL_DATADIR}) -set(datadir ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}) +set(datadir ${CEPH_INSTALL_DATADIR}) set(prefix ${CMAKE_INSTALL_PREFIX}) add_definitions("-DHAVE_CONFIG_H -D__CEPH__ -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS") diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 1aa742d5ae5..4ebff871833 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -127,7 +127,8 @@ add_library(common-common-objs OBJECT # for options.cc target_compile_definitions(common-common-objs PRIVATE "CEPH_LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\"" - "CEPH_PKGLIBDIR=\"${CMAKE_INSTALL_FULL_PKGLIBDIR}\"") + "CEPH_PKGLIBDIR=\"${CMAKE_INSTALL_FULL_PKGLIBDIR}\"" + "CEPH_DATADIR=\"${CEPH_INSTALL_DATADIR}\"") set(common_mountcephfs_srcs armor.c diff --git a/src/common/options.cc b/src/common/options.cc index a9f2c6e25ef..27198996392 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5148,7 +5148,7 @@ std::vector