Alembic unit tests: don't depend on ALEMBIC_ROOT_DIR being defined by user

By mistake, the code relied on ALEMBIC_ROOT_DIR being defined by the user
running the tests. Now CMake macros are used to correctly find the Alembic
root directory.
This commit is contained in:
Sybren A. Stüvel 2017-04-21 16:20:01 +02:00
parent 349cafac52
commit e6ee3fd924
1 changed files with 7 additions and 0 deletions

View File

@ -444,6 +444,13 @@ if(WITH_CYCLES)
endif()
if(WITH_ALEMBIC)
find_package_wrapper(Alembic)
if(NOT ALEMBIC_FOUND)
message(FATAL_ERROR "Alembic is enabled but cannot be found")
endif()
get_filename_component(real_include_dir ${ALEMBIC_INCLUDE_DIR} REALPATH)
get_filename_component(ALEMBIC_ROOT_DIR ${real_include_dir} DIRECTORY)
add_test(script_alembic_import ${TEST_BLENDER_EXE}
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
--