modified pgmlink.cmake