Blob Blame Raw
From 44be2c83f8f7cd285ee0fd946853b98ffed6bd14 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sat, 7 Nov 2015 14:13:47 +0100
Subject: [PATCH 1/2] install cmake files in private directory

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
 CMakeLists.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcf1bb4..349ee66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,7 @@ IF(NOT LIBMINC_EXTERNALLY_CONFIGURED)
   SET (LIBMINC_EXPORTED_TARGETS "LIBMINC-targets")
   SET (LIBMINC_INSTALL_BIN_DIR bin)
   SET (LIBMINC_INSTALL_LIB_DIR lib${LIB_SUFFIX})
+  SET (LIBMINC_INSTALL_CMAKE_DIR lib${LIB_SUFFIX}/cmake/LIBMINC)
   SET (LIBMINC_INSTALL_INCLUDE_DIR include)
   SET (LIBMINC_INSTALL_DATA_DIR share)
 
@@ -419,7 +420,7 @@ configure_file(UseLIBMINC.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/UseLIBMINC.cmake @ONLY)
 
 # config for install dir
-SET(LIBMINC_USE_FILE_CONFIG    "${CMAKE_INSTALL_PREFIX}/${LIBMINC_INSTALL_LIB_DIR}/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake")
+SET(LIBMINC_USE_FILE_CONFIG    "${CMAKE_INSTALL_PREFIX}/${LIBMINC_INSTALL_CMAKE_DIR}/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake")
 SET(LIBMINC_INCLUDE_DIRS_CONFIG ${CMAKE_INSTALL_PREFIX}/${LIBMINC_INSTALL_INCLUDE_DIR} )
 SET(LIBMINC_LIBRARY_DIRS_CONFIG ${CMAKE_INSTALL_PREFIX}/${LIBMINC_INSTALL_LIB_DIR})
 SET(LIBMINC_STATIC_LIBRARIES_CONFIG   "")
@@ -452,7 +453,7 @@ IF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT)
      ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake 
      ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINCConfig.cmake
     DESTINATION 
-     ${LIBMINC_INSTALL_LIB_DIR}
+     ${LIBMINC_INSTALL_CMAKE_DIR}
     COMPONENT Development)
   
 ENDIF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT)
-- 
2.6.2