fixed patch rejection and added RPATH magic

please someone review this. why is:
   SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
needed?

if this RPATH magic wasn't added it would then result in dynamic linking errors for smokegen which would render it useless.