Update scripts to support cmake

Signed-off-by: Rafał Malinowski <rafal.malinowski@corp.bluecherry.net>