I've been fighting with this this morning as well. I found that the best way is to include the full path to the so file in the package_LIBRARIES variable. Then the link_directories is not necessary.

I'll push a sample to suitesparse for you to look at.