Better feature detection for assimp version

The unified headers were introduced in Assimp 2.0.1150, so checking for Assimp 3.0.0 is not quite the best solution.

See 6fa251c2f2
This commit is contained in:
Scott K Logan 2014-01-26 02:05:24 -07:00
parent c7dba8169a
commit 85b2019767
2 changed files with 3 additions and 5 deletions

View File

@ -24,9 +24,8 @@ if ( NOT ASSIMP_FOUND )
endif()
endif()
if( ASSIMP_FOUND )
if( ${ASSIMP_VERSION} STRGREATER "2.0.0" )
set(IS_ASSIMP3 1)
add_definitions(-DIS_ASSIMP3)
if( ${ASSIMP_VERSION} STRGREATER "2.0.1150" )
add_definitions(-DASSIMP_UNIFIED_HEADER_NAMES)
endif()
include_directories(${ASSIMP_INCLUDE_DIRS})
link_directories(${ASSIMP_LIBRARY_DIRS})
@ -38,7 +37,6 @@ else()
set(ASSIMP_CFLAGS_OTHER)
set(ASSIMP_LINK_FLAGS)
set(ASSIMP_INCLUDE_DIRS)
set(IS_ASSIMP3 0) # most likely not
endif()
find_package(COLLADA_DOM 2.3 COMPONENTS 1.5)

View File

@ -62,7 +62,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#if defined(IS_ASSIMP3)
#if defined(ASSIMP_UNIFIED_HEADER_NAMES)
#include <assimp/scene.h>
#include <assimp/LogStream.hpp>
#include <assimp/DefaultLogger.hpp>