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 "") 

# On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3
# VTK6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version
if("${VTK_VERSION}" VERSION_LESS 6.3)
    set_tests_properties(action-reconstruction-integration-test PROPERTIES WILL_FAIL true)
endif()

# Tests fail due to OpenGL crashing when used inside a VM
# As the test can be run directly on a "real" desktop, add the test but flag it with WILL_FAIL
if(WIN32)
    set_tests_properties(action-reconstruction-integration-test PROPERTIES WILL_FAIL true)
endif()
