aboutsummaryrefslogtreecommitdiff
path: root/modules/check_installed_exports_file.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/check_installed_exports_file.cmake')
-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}")