how Gnome support KDE applications?
I don't know if it "supports" them in an active way, but there's probably no reason you can't use them inside GNOME anyway. Many of them should not require KDE to be the running desktop environment, and GNOME won't care.
How shall I install an KDE application properly in Gnome?
apt, or whatever package management system you usually use:
apt-cache search okular. If that doesn't work, try
dpkg -S "*okular*".
Moreover, sometimes I have to install from their source of their latest release, which I often fail to do.
Unless you have a particular reason to do this, just use the available ububtu packages. If you are doing it to avoid pulling in a lot of other KDE stuff, that is a bad reason because:
It is just disk space, probably not more than a few dozen MB. Or so.
You probably won't get around this in the end anyway, as we shall see.
to install latest Okular from source in Ubuntu Gnome, I follow:
Part of those instructions are to first build KDE itself. If you haven't done this, you may have some problems can not be covered by just installing KDE from
apt. For example, it may require the source be available, and if there is some particular reason you want this git repo version of okular, it may depend on the git repo version of KDE.
However, you could first at least try by installing the ubuntu packages. If that doesn't work, just remove them and build from source.
I don't know how to specify -DCMAKE_INSTALL_PREFIX
As per the example on the page you linked, that should be the path where you installed the KDE you built. It looks like it has some defaults that include
/usr/share/kde4/apps, which would probably exist if you try with the ubuntu packages. The exact file you'd need would be:
Which is could be part of a KDE
dpkg -S FindKDE4Internal.cmake may help, although it failed on the ubuntu install I had access to. Since the explicit recommendation for building okular this way is to have a parallel build of KDE on the system, it may not be in any ubuntu package, in which case you have to build KDE from source first.