```cmake``` shouldn't need changes, it already worked for OpenCV. It reads ```CFLAGS```, ```CXXFLAGS``` and ```LDFLAGS```, doesn't it?