diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df5b458a4d0..f232a005ce6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,6 +270,10 @@ option(WITH_MOD_REMESH "Enable Remesh Modifier" ON) # mark_as_advanced(WITH_MOD_CLOTH_ELTOPO) option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF) +# Alembic +option(WITH_ALEMBIC "Enable Alembic Support" OFF) +option(WITH_HDF5 "Enable HDF5 Support for Alembic" OFF) + # Image format support option(WITH_OPENIMAGEIO "Enable OpenImageIO Support (http://www.openimageio.org)" ON) option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ${_init_IMAGE_OPENEXR}) @@ -623,17 +627,23 @@ if(NOT WITH_BOOST) set_and_warn(WITH_CYCLES OFF) set_and_warn(WITH_AUDASPACE OFF) + set_and_warn(WITH_ALEMBIC OFF) set_and_warn(WITH_INTERNATIONAL OFF) set_and_warn(WITH_OPENAL OFF) # depends on AUDASPACE set_and_warn(WITH_GAMEENGINE OFF) # depends on AUDASPACE -elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL) +elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_ALEMBIC OR WITH_INTERNATIONAL) # Keep enabled else() # Enabled but we don't need it set(WITH_BOOST OFF) endif() +# disable hdf5 if Alembic is disabled +if(NOT WITH_ALEMBIC) + set(WITH_HDF5 OFF) +endif() + # auto enable openimageio for cycles if(WITH_CYCLES) set(WITH_OPENIMAGEIO ON) @@ -1093,6 +1103,15 @@ if(UNIX AND NOT APPLE) endif() endif() + if(WITH_ALEMBIC) + find_package_wrapper(Alembic) + set(ALEMBIC_LIBRARIES ${ALEMBIC_LIBRARIES} ${BOOST_LIBRARIES}) + endif() + + if(WITH_HDF5) + find_package_wrapper(HDF5) + endif() + # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm) @@ -2145,6 +2164,12 @@ if(WITH_CYCLES) endif() endif() +if(WITH_ALEMBIC) + if(NOT WITH_BOOST) + message(FATAL_ERROR "Alembic requires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_ALEMBIC") + endif() +endif() + if(WITH_INTERNATIONAL) if(NOT WITH_BOOST) message(FATAL_ERROR "Internationalization requires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_INTERNATIONAL") |