changeset 11993:22c127ff05d5 draft stable

Fix 32 bit build error ( using CMAKE GUI) in Linux
author Jayashree
date Thu, 01 Mar 2018 15:35:06 +0530
parents 2aa737a99f51
children 0b781d592c8e 9086c8a3e76d
files source/CMakeLists.txt
diffstat 1 files changed, 3 insertions(+-), 3 deletions(-) [+]
line wrap: on
line diff
--- a/source/CMakeLists.txt	Wed Feb 21 14:26:41 2018 +0530
+++ b/source/CMakeLists.txt	Thu Mar 01 15:35:06 2018 +0530
@@ -48,12 +48,12 @@ list(FIND POWER_ALIASES "${SYSPROC}" POW
 if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
     set(X86 1)
     add_definitions(-DX265_ARCH_X86=1)
-    if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
+    if(CMAKE_CXX_FLAGS STREQUAL "-m32")
+        message(STATUS "Detected x86 target processor")
+    elseif("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
         set(X64 1)
         add_definitions(-DX86_64=1)
         message(STATUS "Detected x86_64 target processor")
-    else()
-        message(STATUS "Detected x86 target processor")
     endif()
 elseif(POWERMATCH GREATER "-1")
     message(STATUS "Detected POWER target processor")