camitk_extension(ACTION_EXTENSION
                 DEFINES COMPILE_RECONSTRUCTION_ACTION_API
                 CEP_NAME SDK
                 DESCRIPTION "Use marching cube algorithm to create a surfacic mesh from a volumic image"
                 ENABLE_AUTO_TEST
                 TEST_FILES sinus_skin.vtk brain.mha sinus.mhd
                 ENABLE_INTEGRATION_TEST
)

# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") 

# --------------------------------
# --- Specific test management ---
# --------------------------------
camitk_tests_requirement(TESTS action-reconstruction-integration-test
                         REQUIRES "${VTK_VERSION} VERSION_EQUAL 7.1.1"
                         REASON "VTK version is not equals than 7.1.1
   The default test files are written using the currently supported version of VTK (VTK 7.1).
   This test will therefore fail when comparing the input to the output if another version of VTK is used.
   Although everything should work fine, the output diff will make this test unconditionnaly fail."
)

camitk_tests_requirement(TESTS action-reconstruction-integration-test
                         REQUIRES "NOT WIN32"
                         REASON "WIN32 OpenGL failure on a VM
   This test will always fail when run inside a VM due to OpenGL crash.
   This test will pass when run directly from a physical windows machine."
)
