From 50a2e80e96caf458b7a70d4dcc1003ab0441b6c2 Mon Sep 17 00:00:00 2001 From: Daniel Knezevic Date: Thu, 18 Aug 2016 10:51:20 +0200 Subject: [PATCH 1/3] Use Assimp namespace to fix build for big-endian architectures --- code/glTFAsset.inl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/glTFAsset.inl b/code/glTFAsset.inl index d52c825c4..470246c94 100644 --- a/code/glTFAsset.inl +++ b/code/glTFAsset.inl @@ -40,6 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StringUtils.h" +using namespace Assimp; + namespace glTF { namespace { From aef1b1c51b4fc8207745c1e9de2744d6d18eb312 Mon Sep 17 00:00:00 2001 From: Lucas Stanek Date: Thu, 18 Aug 2016 00:03:29 +0000 Subject: [PATCH 2/3] Building static ZLIB on 64b LInux requires -fPIC for C compiler. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b7ac1af4..c47fa5bd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,9 @@ 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") + IF(ASSIMP_BUILD_ZLIB) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + ENDIF() ENDIF() # hide all not-exported symbols SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -std=c++0x" ) From 4dfe2a1bad1ae67e85aae6a483e4a80df8dc29b1 Mon Sep 17 00:00:00 2001 From: Lucas Stanek Date: Thu, 18 Aug 2016 22:23:12 +0000 Subject: [PATCH 3/3] Add -fPIC to C Flags for 64bit linux Shared Object builds without checking if zlib is being built. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c47fa5bd3..5105e3a1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,9 +164,7 @@ 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") - IF(ASSIMP_BUILD_ZLIB) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - ENDIF() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ENDIF() # hide all not-exported symbols SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -std=c++0x" )