From ec67a1f2eae7d343e1c56a8a47bf80fdce93474c Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 14 Aug 2016 12:23:16 +0200 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/97: define for 32-bit linux --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5f4a02..af472a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,6 +154,13 @@ IF( CMAKE_COMPILER_IS_MINGW ) ADD_DEFINITIONS(-DASSIMP_BUILD_NO_IFC_IMPORTER ) ENDIF() +# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux +IF( UNIX ) + IF (BUILD_SHARED_LIBS AND CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux + ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 ) + ENDIF() +ENDIF() + IF((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW) IF (BUILD_SHARED_LIBS AND CMAKE_SIZEOF_VOID_P EQUAL 8) # -fPIC is only required for shared libs on 64 bit SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -- 2.7.4