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
                 NEEDS_LIBXML2
                 NEEDS_XSD                 
                 NEEDS_TOOL 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
)

if(COMPONENT_MML)
	#FIXME this is just to avoid link error for MSVC:
	# msvc2008 (v9) cannot link mml.dll (the component) with the mml.lib (the tool)
	# it complains it can not link with mml with itself, without considering it 
	# can be two different libs
	if(WIN32)
		set_target_properties(component-mml PROPERTIES OUTPUT_NAME component-mml)
	endif()
endif()	