
# 
# 添加库文件
# 
# dios_module_add_libraries(MODULE LIBRARIES1 LIBRARIES)
MACRO(dios_module_add_libraries MODULE)
	
	SET(DIOS_CONFIG_MODULE_ADD_LIBRARIES_FLAG FALSE)
	FOREACH( TEMP ${ARGN} )
		# 唯一性检测;
		FOREACH(TEMP_VALUE ${DIOS_MODULE_${MODULE}_LIBRARIES})
			IF(${TEMP_MODULE_ADD_LIBRARIES} MATCHES "\\.a\$")
				SET(DIOS_CONFIG_MODULE_ADD_LIBRARIES_FLAG TRUE)
			ENDIF()
		ENDFOREACH()
	ENDFOREACH()

	# 调整ios的包含;
	IF(DIOS_CMAKE_PLATFORM_IOS OR DIOS_CMAKE_PLATFORM_MAC)
		IF(MODULE_ADD_LIBRARIES_FLAG)
			LIST(APPEND DIOS_MODULE_${MODULE}_LIBRARIES "-force_load")
		ENDIF()
	ENDIF()	
	LIST(APPEND DIOS_MODULE_${MODULE}_LIBRARIES ${ARGN})	

ENDMACRO()
