if(COMPONENT_MML)
    set(MML_GENERATE_GUI ON CACHE BOOL "Forced by COMPONENT_MML" FORCE)

    #FIXME Sofa support => fix sofa dependency properly
    if(MML_SOFA_SUPPORT)
        if(WIN32)
            set(MML_SOFA_LIB_DIR ${MML_SOFA_DIR}/lib/win32/ReleaseVC9 ${MML_SOFA_DIR}/lib/win32 ${MML_SOFA_DIR}/lib ${MML_SOFA_DIR}/bin)
        else()
            set(MML_SOFA_LIB_DIR ${MML_SOFA_DIR}/lib/linux ${MML_SOFA_DIR}/lib)
        endif()
        link_directories(${MML_SOFA_LIB_DIR})
    endif()
endif()

camitk_extension(   COMPONENT_EXTENSION
                    DEFINES COMPILE_MMLCOMPONENT_API
                    NEEDS_LIBXML2
                    NEEDS_XSD
                    NEEDS_CEP_LIBRARIES pml lml mml monitoringgui monitoring
                    NEEDS_COMPONENT_EXTENSION  vtkmesh physicalmodel
                    HEADERS_TO_INSTALL  MMLComponentExtension.h
                                        MMLComponent.h
                                        MMLDisplay.h
                                        MMLMonitorDisplay.h
                                        MMLMonitorDisplayFactory.h
                                        MMLMonitorDisplays/Colors.h
                                        MMLMonitorDisplays/Arrows.h
                                        MMLMonitorDisplays/Tabular.h
                                        MMLComponentPopup.h
                                        MMLComponentAPI.h
                    CEP_NAME CEP_MODELING
                    DESCRIPTION "Component MML allows one to handle XML file that compare biomechanical simulations with different simulators"
                    TEST_APPLICATION ${APPLICATION_TEST_COMPONENT}
)
