You can figure it out for yourself. Look up passages in the old and new testament regarding homosexuality. Each statement uses a verb, meaning a completed act, and the punishment for that act. Thus the implication is that the acts are what are considered sinful, or the most sinful, however you choose to look at the rest of it; i.e., urges, temptations versus acts.
Thoughts, temptations, and urges unacted upon in any way, such as viewing pornography, and other icky practices ;-), are not considered sinful in present-day catholic moral teaching.
Sorry, I'm not up to tracking down the exact biblical passages. Those people who wrote the bible weren't as explicit about these topics as we moderns, thus everything is couched in words such as "to lie with a man as with a woman".
And, of course, we know what happened to Sodom. Evidently they got blown away because of their acts, not their thoughts.