0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 8d272e53a4d1dc405e08ce2dd50159c58f4451e9 Mon Sep 17 00:00:00 2001
  2. From: Ruslan Bilovol <rbilovol@cisco.com>
  3. Date: Thu, 24 Jan 2019 18:11:39 +0200
  4. Subject: [PATCH] CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path
  5. Currently this path is hardcoded to lib/cmake.
  6. Some distributions have different library path (like lib64).
  7. So reuse LIB_INSTALL_DIR for that to make CMAKECONFIG_INSTALL_DIR
  8. configurable and usable in such distros.
  9. Upstream-Status: Backport [https://github.com/Tencent/rapidjson/commit/8d272e53a4d1dc405e08ce2dd50159c58f4451e9]
  10. Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
  11. ---
  12. CMakeLists.txt | 4 ++--
  13. 1 file changed, 2 insertions(+), 2 deletions(-)
  14. diff --git a/CMakeLists.txt b/CMakeLists.txt
  15. index 7c60407..0275672 100644
  16. --- a/CMakeLists.txt
  17. +++ b/CMakeLists.txt
  18. @@ -199,9 +199,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
  19. ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
  20. # ... for the install tree
  21. -SET( CMAKECONFIG_INSTALL_DIR lib/cmake/${PROJECT_NAME} )
  22. +SET( CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} )
  23. FILE( RELATIVE_PATH REL_INCLUDE_DIR
  24. - "${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}"
  25. + "${CMAKECONFIG_INSTALL_DIR}"
  26. "${CMAKE_INSTALL_PREFIX}/include" )
  27. SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
  28. --
  29. 1.9.1