FUNCTION(JOIN_SIMPLE VALUES OUTPUT)
	FOREACH(_VAL ${VALUES})
		IF(DEFINED _TMP)
			SET(_TMP "${_TMP} ${_VAL}")
		ELSE(DEFINED _TMP)
			SET(_TMP "${_VAL}")
		ENDIF(DEFINED _TMP)
	ENDFOREACH(_VAL)
	SET(${OUTPUT} "${_TMP}" PARENT_SCOPE)
ENDFUNCTION()

FUNCTION(JOIN_QUOTED VALUES OUTPUT)
	FOREACH(_VAL ${VALUES})
		STRING(REPLACE "\\" "\\\\" _VAL "${_VAL}")
		STRING(REPLACE "\"" "\\\"" _VAL "${_VAL}")
		IF(DEFINED _TMP)
			SET(_TMP "${_TMP} \"${_VAL}\"")
		ELSE(DEFINED _TMP)
			SET(_TMP "\"${_VAL}\"")
		ENDIF(DEFINED _TMP)
	ENDFOREACH(_VAL)
	SET(${OUTPUT} "${_TMP}" PARENT_SCOPE)
ENDFUNCTION()
