From: Kim Kulling Date: Sun, 14 Aug 2016 10:23:16 +0000 (+0200) Subject: closes https://github.com/assimp/assimp/issues/97: define for 32-bit linux X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec67a1f2eae7d343e1c56a8a47bf80fdce93474c;p=platform%2Fupstream%2Fassimp.git closes https://github.com/assimp/assimp/issues/97: define for 32-bit linux --- 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")