summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-20 14:20:07 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-20 14:20:07 (GMT)
commit86b6cbeaad642f4479b1b089edec4837ce0da48d (patch)
tree58e057db269502545fb795153d85b631029289c3 /Modules
parent481c5fd31e99b4aa0277dc76c7a201c627f3db79 (diff)
parent48984958192029f57338f511885eed85d1963f94 (diff)
downloadCMake-86b6cbeaad642f4479b1b089edec4837ce0da48d.zip
CMake-86b6cbeaad642f4479b1b089edec4837ce0da48d.tar.gz
CMake-86b6cbeaad642f4479b1b089edec4837ce0da48d.tar.bz2
Merge topic 'find-package-mode-fix-multiarch'
48984958 CMakeFindPackageMode: Fix Debian multiarch default guess (#15250)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindPackageMode.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake
index fc3058d..26731dc 100644
--- a/Modules/CMakeFindPackageMode.cmake
+++ b/Modules/CMakeFindPackageMode.cmake
@@ -102,15 +102,18 @@ if(UNIX)
# guess Debian multiarch if it has not been set:
if(EXISTS /etc/debian_version)
- if(NOT CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE )
+ if(NOT CMAKE_${LANGUAGE}_LIBRARY_ARCHITECTURE )
file(GLOB filesInLib RELATIVE /lib /lib/*-linux-gnu* )
foreach(file ${filesInLib})
if("${file}" MATCHES "${CMAKE_LIBRARY_ARCHITECTURE_REGEX}")
- set(CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE ${file})
+ set(CMAKE_${LANGUAGE}_LIBRARY_ARCHITECTURE ${file})
break()
endif()
endforeach()
endif()
+ if(NOT CMAKE_LIBRARY_ARCHITECTURE)
+ set(CMAKE_LIBRARY_ARCHITECTURE ${CMAKE_${LANGUAGE}_LIBRARY_ARCHITECTURE})
+ endif()
endif()
endif()