Add glew to cmake. Other fixes:

* Fix external folders thing.
* Silence warnings for lua.