From c3cccd40183daa893491beeec0ca485687d74f17 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Tue, 8 Mar 2011 11:55:45 +0000 Subject: [PATCH] 'local install' issues --- CMakeLists.txt | 4 ++++ .../creaNewProject/NewProject/CMakeLists.txt.in | 3 +++ cmake/CREAMacro_InstallLibraryForCMake.cmake | 16 ++++++++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 653ba84..e2133a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,10 @@ IF(CREA_BUILD_WX) SET(CREA_BUILT_WITH_WX ON) ENDIF(CREA_BUILD_WX) +# JPR 4 mars 2011 +set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module) + + CREA_FIND_AND_USE_LIBRARIES() SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}) diff --git a/appli/creaNewProject/NewProject/CMakeLists.txt.in b/appli/creaNewProject/NewProject/CMakeLists.txt.in index 5edc559..f0758e9 100644 --- a/appli/creaNewProject/NewProject/CMakeLists.txt.in +++ b/appli/creaNewProject/NewProject/CMakeLists.txt.in @@ -35,6 +35,9 @@ SET(PROJECT_VERSION_DATE "11/02/2010") #ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} ) #ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} ) +# JPR 4 mars 2011 +set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module) + #================================== SET(CREA_VERBOSE_CMAKE TRUE) #================================== diff --git a/cmake/CREAMacro_InstallLibraryForCMake.cmake b/cmake/CREAMacro_InstallLibraryForCMake.cmake index 1cedd6b..5996679 100644 --- a/cmake/CREAMacro_InstallLibraryForCMake.cmake +++ b/cmake/CREAMacro_InstallLibraryForCMake.cmake @@ -44,7 +44,7 @@ # * ${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS # The list of include paths # when someone uses an *INSTALLED* version of ${LIBRARY_NAME} -# The paths *MUST BE RELATIVE* to INSTALL_PREFIX +# The paths *MUST BE RELATIVE* to CMAKE_INSTALL_PREFIX # # A typical example is "include/${LIBRARY_NAME}" # * ${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS # Like the previous var but for library paths. @@ -61,8 +61,8 @@ # * ${LIBRARY_NAME}_MINOR_VERSION # * ${LIBRARY_NAME}_BUILD_VERSION # * ${LIBRARY_NAME}_INSTALL_FOLDER : if set then install the generated files -# in INSTALL_PREFIX/lib/${LIBRARY_NAME}_INSTALL_FOLDER -# instead of INSTALL_PREFIX/lib/${LIBRARY_NAME} +# in CMAKE_INSTALL_PREFIX/lib/${LIBRARY_NAME}_INSTALL_FOLDER +# instead of CMAKE_INSTALL_PREFIX/lib/${LIBRARY_NAME} # # # To provide a user defined @@ -86,7 +86,7 @@ # AdditionalUse${LIBRARY_NAME}.cmake # # At install-time, the same files are installed -# in INSTALL_PREFIX/lib/${LIBRARY_NAME}_INSTALL_FOLDER +# in CMAKE_INSTALL_PREFIX/lib/${LIBRARY_NAME}_INSTALL_FOLDER # and the file : # Find${LIBRARY_NAME}.cmake # is installed in ${CMAKE_ROOT}/Modules/ @@ -255,6 +255,14 @@ MACRO(CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE LIBRARY_NAME) # FILES ${CILC_WORK_DIR}/Find${LIBRARY_NAME}.cmake # DESTINATION ${CMAKE_ROOT}/Modules # ) + +# JPR 04 Mars 2011 + INSTALL( + FILES ${CILC_WORK_DIR}/Find${LIBRARY_NAME}.cmake + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules + ) + + #--------------------------------------------------------------------------- -- 2.47.1