@@ -131,20 +131,25 @@ IF ( ASSIMP_ENABLE_BOOST_WORKAROUND )
131131 ADD_DEFINITIONS ( -DASSIMP_BUILD_BOOST_WORKAROUND )
132132 MESSAGE ( STATUS "Building a non-boost version of Assimp." )
133133ELSE ( ASSIMP_ENABLE_BOOST_WORKAROUND )
134- SET ( Boost_DETAILED_FAILURE_MSG ON )
135- IF ( NOT Boost_ADDITIONAL_VERSIONS )
136- SET ( Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48.0" "1.48" "1.49" "1.49.0" "1.50" "1.50.0" "1.51" "1.51.0" "1.52.0" "1.53.0" "1.54.0" "1.55" "1.55.0" "1.56" "1.56.0" "1.57" "1.57.0" "1.58" "1.58.0" "1.59" "1.59.0" )
137- ENDIF ( NOT Boost_ADDITIONAL_VERSIONS )
138- FIND_PACKAGE ( Boost )
139- IF ( NOT Boost_FOUND )
140- MESSAGE ( FATAL_ERROR
141- "Boost libraries (http://www.boost.org/) not found. "
142- "You can build a non-boost version of Assimp with slightly reduced "
143- "functionality by specifying -DASSIMP_ENABLE_BOOST_WORKAROUND=ON."
144- )
145- ENDIF ( NOT Boost_FOUND )
134+ if (HUNTER_ENABLED)
135+ hunter_add_package(Boost)
136+ find_package (Boost CONFIG REQUIRED)
137+ else ()
138+ SET ( Boost_DETAILED_FAILURE_MSG ON )
139+ IF ( NOT Boost_ADDITIONAL_VERSIONS )
140+ SET ( Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48.0" "1.48" "1.49" "1.49.0" "1.50" "1.50.0" "1.51" "1.51.0" "1.52.0" "1.53.0" "1.54.0" "1.55" "1.55.0" "1.56" "1.56.0" "1.57" "1.57.0" "1.58" "1.58.0" "1.59" "1.59.0" )
141+ ENDIF ( NOT Boost_ADDITIONAL_VERSIONS )
142+ FIND_PACKAGE ( Boost )
143+ IF ( NOT Boost_FOUND )
144+ MESSAGE ( FATAL_ERROR
145+ "Boost libraries (http://www.boost.org/) not found. "
146+ "You can build a non-boost version of Assimp with slightly reduced "
147+ "functionality by specifying -DASSIMP_ENABLE_BOOST_WORKAROUND=ON."
148+ )
149+ ENDIF ( NOT Boost_FOUND )
146150
147- INCLUDE_DIRECTORIES ( ${Boost_INCLUDE_DIRS} )
151+ INCLUDE_DIRECTORIES ( ${Boost_INCLUDE_DIRS} )
152+ endif ()
148153ENDIF ( ASSIMP_ENABLE_BOOST_WORKAROUND )
149154
150155FIND_PACKAGE ( DirectX )
0 commit comments