From 6a788dac0150bb64d5145a7278381b512e275f87 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 15 Feb 2019 20:14:53 +0800 Subject: [PATCH] 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 --- src/CMakeLists.txt | 4 +++- src/common/CMakeLists.txt | 3 ++- src/common/options.cc | 2 +- src/crimson/CMakeLists.txt | 3 ++- src/pybind/mgr/CMakeLists.txt | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3f7123f5451ea..3031524230d44 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 1aa742d5ae55d..4ebff8718330a 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 a9f2c6e25eff0..27198996392c9 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5148,7 +5148,7 @@ std::vector