diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-08-30 19:27:30 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-08-30 21:52:40 (GMT) |
commit | 0fc10bb19bd63ca9f6647a7b373e91fb16403249 (patch) | |
tree | 942b69b1cd977e8d7ee67d96cc17827422cf5eb9 /Modules/CMakeSystemSpecificInformation.cmake | |
parent | 43d31c519882f63456eafcaa2bd5c1bfc4e2ef1f (diff) | |
download | CMake-0fc10bb19bd63ca9f6647a7b373e91fb16403249.zip CMake-0fc10bb19bd63ca9f6647a7b373e91fb16403249.tar.gz CMake-0fc10bb19bd63ca9f6647a7b373e91fb16403249.tar.bz2 |
CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
Fixes #23900
Diffstat (limited to 'Modules/CMakeSystemSpecificInformation.cmake')
-rw-r--r-- | Modules/CMakeSystemSpecificInformation.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake index 59f552a..e045932 100644 --- a/Modules/CMakeSystemSpecificInformation.cmake +++ b/Modules/CMakeSystemSpecificInformation.cmake @@ -19,13 +19,19 @@ set(WIN32 ) function(_cmake_record_install_prefix ) set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_VALUE "${CMAKE_INSTALL_PREFIX}" PARENT_SCOPE) - set(count 0) + set(_CMAKE_SYSTEM_PREFIX_PATH_STAGING_PREFIX_VALUE "${CMAKE_STAGING_PREFIX}" PARENT_SCOPE) + set(icount 0) + set(scount 0) foreach(value IN LISTS CMAKE_SYSTEM_PREFIX_PATH) if(value STREQUAL CMAKE_INSTALL_PREFIX) - math(EXPR count "${count}+1") + math(EXPR icount "${icount}+1") + endif() + if(value STREQUAL CMAKE_STAGING_PREFIX) + math(EXPR scount "${scount}+1") endif() endforeach() - set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_COUNT "${count}" PARENT_SCOPE) + set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_COUNT "${icount}" PARENT_SCOPE) + set(_CMAKE_SYSTEM_PREFIX_PATH_STAGING_PREFIX_COUNT "${scount}" PARENT_SCOPE) endfunction() # include Generic system information |