diff options
author | Felix Geyer <debfx@ubuntu.com> | 2015-01-19 15:39:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-19 15:45:32 (GMT) |
commit | 48984958192029f57338f511885eed85d1963f94 (patch) | |
tree | 5468e3b64f7bd174856e65b60a7febb754450736 /Modules/CMakeFindPackageMode.cmake | |
parent | 2e71d92ef270c4234368fd2e88259c0defbfb650 (diff) | |
download | CMake-48984958192029f57338f511885eed85d1963f94.zip CMake-48984958192029f57338f511885eed85d1963f94.tar.gz CMake-48984958192029f57338f511885eed85d1963f94.tar.bz2 |
CMakeFindPackageMode: Fix Debian multiarch default guess (#15250)
In commit v2.8.6~102^2~18 (Better support for lib64 and Debian
multiarch, 2011-07-14) variable names "..._LANGUAGE_ARCHITECTURE" were
set instead of the correct "..._LIBRARY_ARCHITECTURE". Fix this typo
and also set the language-independent variable
CMAKE_LIBRARY_ARCHITECTURE.
Diffstat (limited to 'Modules/CMakeFindPackageMode.cmake')
-rw-r--r-- | Modules/CMakeFindPackageMode.cmake | 7 |
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() |