CMake: fix install of libraries

Do not need to reconfigure the make file to be able to install
libraries.
CMake: fix java binding

* Do not need to reconfigure the make file to be able to generate class
files and jar file.
* The solution was to add a custom command as a post build of the java
binding which generate java files.