message("Welcome Aaki's config.")

FUNCTION(fn_find_cfg result source_dir cfg_file)
	STRING(REPLACE "/" ";" temp_list1 ${source_dir})
	SET(temp_list2 ${temp_list1})

	foreach(temp1 ${temp_list1})
		unset(search_dir)
		foreach(temp2 ${temp_list2})
			set(search_dir ${search_dir}/${temp2})
		endforeach(temp2)
		if(EXISTS ${search_dir}/${cfg_file})
			message("EXISTS_file : " ${search_dir}/${cfg_file})
			set(${result} ${search_dir} PARENT_SCOPE)
			set(CFG_ROOT2 $${result} PARENT_SCOPE)
			break()
		else()
			list(REMOVE_AT temp_list2 -1)
		endif()
	endforeach(temp1)
ENDFUNCTION(fn_find_cfg)

