From 4a5393b41e4d4f068e2af397980a5c7455be6b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 9 Mar 2018 12:14:11 +0100 Subject: [PATCH] CMake: Set SWIG word size based on architecture Fixes #906. --- qrenderdoc/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt index 0cd823aa9..a3dab7f81 100644 --- a/qrenderdoc/CMakeLists.txt +++ b/qrenderdoc/CMakeLists.txt @@ -16,7 +16,11 @@ if(STATIC_QRENDERDOC) endif() if(NOT APPLE) - set(SWIG_FLAGS "-DSWIGWORDSIZE64") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit + set(SWIG_FLAGS "-DSWIGWORDSIZE64") + else() # 32-bit + set(SWIG_FLAGS "-DSWIGWORDSIZE32") + endif() endif() if(QRENDERDOC_NO_CXX11_REGEX)