From cb5d64618a470700e0ff86435cecc64ca46afcac Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 6 Jan 2009 18:22:56 +0000 Subject: -this should now also work for relative install directories Alex svn path=/trunk/KDE/kdelibs/; revision=906719 --- modules/check_installed_exports_file.cmake | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'modules') diff --git a/modules/check_installed_exports_file.cmake b/modules/check_installed_exports_file.cmake index 454d2a09..ab36b9cf 100644 --- a/modules/check_installed_exports_file.cmake +++ b/modules/check_installed_exports_file.cmake @@ -22,23 +22,25 @@ if(EXISTS "${installedExportsFile}") if (${INSTALL_DIR} MATCHES "^(/)(.+)$") set(binaryDirExportFileDir "_${CMAKE_MATCH_2}") set(binaryDirExportsFile "${CURRENT_BINARY_DIR}/CMakeFiles/Export/${binaryDirExportFileDir}/${FILENAME}") + else (${INSTALL_DIR} MATCHES "^(/)(.+)$") + set(binaryDirExportsFile "${CURRENT_BINARY_DIR}/CMakeFiles/Export/${INSTALL_DIR}/${FILENAME}") + endif (${INSTALL_DIR} MATCHES "^(/)(.+)$") - if(EXISTS "${binaryDirExportsFile}") - file(READ "${installedExportsFile}" installedExportsFileContents) - file(READ "${binaryDirExportsFile}" binaryDirExportsFileContents) + if(EXISTS "${binaryDirExportsFile}") + file(READ "${installedExportsFile}" installedExportsFileContents) + file(READ "${binaryDirExportsFile}" binaryDirExportsFileContents) - if(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") + if(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") - if("${FILENAME}" MATCHES "^(.+)(\\.cmake)$") - message(STATUS "Installed and new ${FILENAME} differ, removing installed ${CMAKE_MATCH_1}-*.cmake files") - file(GLOB files "${installDir}/${CMAKE_MATCH_1}-*.cmake") - file(REMOVE ${files}) - endif("${FILENAME}" MATCHES "^(.+)(\\.cmake)$") -# else(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") -# message(STATUS "FILES are the same") - endif(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") + if("${FILENAME}" MATCHES "^(.+)(\\.cmake)$") + message(STATUS "Installed and new ${FILENAME} differ, removing installed ${CMAKE_MATCH_1}-*.cmake files") + file(GLOB files "${installDir}/${CMAKE_MATCH_1}-*.cmake") + file(REMOVE ${files}) + endif("${FILENAME}" MATCHES "^(.+)(\\.cmake)$") + else(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") + message(STATUS "FILES are the same") + endif(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") - endif(EXISTS "${binaryDirExportsFile}") - endif (${INSTALL_DIR} MATCHES "^(/)(.+)$") + endif(EXISTS "${binaryDirExportsFile}") endif(EXISTS "${installedExportsFile}") -- cgit v1.2.1