Skip to content
This repository was archived by the owner on Jul 9, 2019. It is now read-only.

Commit 53ae7e3

Browse files
committed
Depends on Boost
1 parent d74dcc8 commit 53ae7e3

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

CMakeLists.txt

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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." )
133133
ELSE ( 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()
148153
ENDIF ( ASSIMP_ENABLE_BOOST_WORKAROUND )
149154

150155
FIND_PACKAGE( DirectX )

cmake/Config.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@PACKAGE_INIT@
22

3+
find_package(Boost CONFIG REQUIRED)
34
find_package(ZLIB CONFIG REQUIRED)
45
find_package(convertutf CONFIG REQUIRED)
56
find_package(irrXML CONFIG REQUIRED)

code/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ TARGET_LINK_LIBRARIES(
744744
poly2tri::poly2tri
745745
minizip::minizip
746746
ZLIB::zlib
747+
Boost::boost
747748
)
748749

749750
target_compile_definitions(assimp PUBLIC ASSIMP_BUILD_NO_OWN_ZLIB)

0 commit comments

Comments
 (0)