Updated to use CMake's improved target commands.
linker fix