summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.de>2015-08-24 14:53:00 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-24 14:54:13 (GMT)
commitc4d78b8bc05d44b8a46b5d2db6b52b42a101ef2d (patch)
treef0e9d1232d5d038eb63c8553db394ad88aa0948f /Modules
parent2370a99400c6450606e25562386cf40bc9c41f38 (diff)
downloadCMake-c4d78b8bc05d44b8a46b5d2db6b52b42a101ef2d.zip
CMake-c4d78b8bc05d44b8a46b5d2db6b52b42a101ef2d.tar.gz
CMake-c4d78b8bc05d44b8a46b5d2db6b52b42a101ef2d.tar.bz2
FindJNI: Add support for x32 architecture on Linux (#15710)
This architecture uses an amd64 kernel but x32 userland. Use CMAKE_LIBRARY_ARCHITECTURE to distinguish it for now.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindJNI.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index d248fe1..d31fea3 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -42,7 +42,11 @@ macro(java_append_library_directories _var)
# 1.6.0_18 + icedtea patches. However, it would be much better to base the
# guess on the first part of the GNU config.guess platform triplet.
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
+ set(_java_libarch "x32" "amd64" "i386")
+ else()
set(_java_libarch "amd64" "i386")
+ endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set(_java_libarch "i386")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")