build fixes: build options moved into the beginning of main cmake file;link directories for enca when it's located in non-standard path