Skip to content

Commit

Permalink
{cmake} Turn on ASSIMP_BUILD_ZLIB for Linux
Browse files Browse the repository at this point in the history
Linux needs zlib built with -fPIC, so build it from the source.

Reference: #9
  • Loading branch information
asmaloney committed Jun 20, 2024
1 parent 09d3248 commit 6c07260
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ if ( PLUGIN-3rdParty_MESH_IO )
set( ASSIMP_BUILD_GLTF_IMPORTER TRUE CACHE INTERNAL "override ASSIMP flags" FORCE )
set( ASSIMP_BUILD_IFC_IMPORTER TRUE CACHE INTERNAL "override ASSIMP flags" FORCE )

# Linux needs zlib built with -fPIC, so build from source
if ( UNIX AND NOT APPLE )
set( ASSIMP_BUILD_ZLIB TRUE CACHE INTERNAL "override ASSIMP flags" )
endif()

add_subdirectory( extern/assimp EXCLUDE_FROM_ALL )

# See: https://github.com/asmaloney/MeshIO/issues/1
Expand Down

0 comments on commit 6c07260

Please sign in to comment.