I finally managed to get it installed. I will list out the things you need to do and proceed further.
As @rioki advised me - I used the cmake-gui to configure and generate the appropriate files.
First make sure that you are making the right kind of file. There are many options available. In my case I was trying to install PhysicsFS in MinGW and I had to learn the hard way that you should make files for MSYS file system.
And then use ( in my case I had different compilers) - Specify Native Compiler
Then when you finish. If there are any errors in the configuration process the cmake gui will help with it and you can use the gui to specify the path to correct location.
If everything is correct - (No red flags) - Then press "Generate"
Then you can go into the shell window and go ahead with the compilation process.







