Updated to use CMake's improved target commands.