From e6a773bc7a9fc8c837ac302b2b06b4671d134cf2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 18 Jun 2020 06:33:13 +0800 Subject: [PATCH] cmake: move include(GNUInstallDirs) up so systemd/CMakeLists.txt can have access to the variables defined by it. quote from https://cmake.org/cmake/help/latest/command/include.html. > Variable reads and writes access the scope of the caller (dynamic > scoping). Signed-off-by: Kefu Chai --- CMakeLists.txt | 1 + src/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 714fa08a3d7ec..0d94cdbf74d89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +include(GNUInstallDirs) include(CephChecks) set(CEPH_MAN_DIR "share/man" CACHE STRING "Install location for man pages (relative to prefix).") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 801bbe5941f5b..7464ba63b952b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,6 @@ include(GetGitRevisionDescription) include(CheckCXXCompilerFlag) -include(GNUInstallDirs) # for erasure and compressor plugins set(CEPH_INSTALL_PKGLIBDIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}) set(CEPH_INSTALL_FULL_PKGLIBDIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}) -- 2.39.5