aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-01-06 18:22:56 +0000
committerAlexander Neundorf <neundorf@kde.org>2009-01-06 18:22:56 +0000
commitcb5d64618a470700e0ff86435cecc64ca46afcac (patch)
tree78dc013b17f016719fe6e5839131c9167fb75ef5
parent6280df3dd62e0fea5d8cf35f63ea5a6453841c66 (diff)
downloadextra-cmake-modules-cb5d64618a470700e0ff86435cecc64ca46afcac.tar.gz
extra-cmake-modules-cb5d64618a470700e0ff86435cecc64ca46afcac.tar.bz2
-this should now also work for relative install directories
Alex svn path=/trunk/KDE/kdelibs/; revision=906719
-rw-r--r--modules/check_installed_exports_file.cmake30
1 files changed, 16 insertions, 14 deletions
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}")