I tried adding a comment to Edgar's answer but it ended up growing too long.
In addition to telling him that you aren't/won't be interested in him, you need to need to make it clear that you still want him in your life. When you do so, try to avoid using the word "friend" as in "I like you as a friend." This has unfortunately emerged in pop culture as the friend zone, seen as an inescapable prison for nice guys who deserve the girl who is too foolish to see their value.
Instead explain to him that he's an important part of your life as he is and the fact that he's blatantly ignoring your boundaries not only looks bad on his part, but also causes more hurt for you. Let him know that he's an important part of your life and that you need him to be there to help you rather than put his own interests ahead of yours. Try to avoid ultimatums, but if he refuses to accept what you say, you may need to make it clear that, even though it hurts you, you can't have him in your life for a time if all he's going to do is try to make advances on you.
Even if your conversation goes fantastically, things will change. You may see a bit of an absence from Bob while he comes to terms with it but if he truly values youhopefully he'll come back with a better understanding of how you two fit together.