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:
parent
c7dba8169a
commit
85b2019767
|
@ -24,9 +24,8 @@ if ( NOT ASSIMP_FOUND )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if( ASSIMP_FOUND )
|
if( ASSIMP_FOUND )
|
||||||
if( ${ASSIMP_VERSION} STRGREATER "2.0.0" )
|
if( ${ASSIMP_VERSION} STRGREATER "2.0.1150" )
|
||||||
set(IS_ASSIMP3 1)
|
add_definitions(-DASSIMP_UNIFIED_HEADER_NAMES)
|
||||||
add_definitions(-DIS_ASSIMP3)
|
|
||||||
endif()
|
endif()
|
||||||
include_directories(${ASSIMP_INCLUDE_DIRS})
|
include_directories(${ASSIMP_INCLUDE_DIRS})
|
||||||
link_directories(${ASSIMP_LIBRARY_DIRS})
|
link_directories(${ASSIMP_LIBRARY_DIRS})
|
||||||
|
@ -38,7 +37,6 @@ else()
|
||||||
set(ASSIMP_CFLAGS_OTHER)
|
set(ASSIMP_CFLAGS_OTHER)
|
||||||
set(ASSIMP_LINK_FLAGS)
|
set(ASSIMP_LINK_FLAGS)
|
||||||
set(ASSIMP_INCLUDE_DIRS)
|
set(ASSIMP_INCLUDE_DIRS)
|
||||||
set(IS_ASSIMP3 0) # most likely not
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(COLLADA_DOM 2.3 COMPONENTS 1.5)
|
find_package(COLLADA_DOM 2.3 COMPONENTS 1.5)
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
#if defined(IS_ASSIMP3)
|
#if defined(ASSIMP_UNIFIED_HEADER_NAMES)
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/LogStream.hpp>
|
#include <assimp/LogStream.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
|
Loading…
Reference in New Issue