Is the word "set" used in the same way in the following two sentences?

Set this poem to music.

To set pear trees in an orchard.
different meanings