trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2011

Re: [trinity-devel] TDE CMake learning Q - How does 'install ( FILES...' put things in 2 places?

From: Serghei Amelian <serghei@...>
Date: Sat, 5 Mar 2011 11:25:07 +0200
On Saturday 05 March 2011 06:31:48 David C. Rankin wrote:
> Guys,
>
>   I'm making headway figuring out CMake so I can be a bit more helpful. I'm
> currently reverse engineering kruler (it's small enough to learn with). So
> far, the kruler CMakeLists.txt is easy to follow, but I can't figure out
> how the following creates 2 files??
>
> install( FILES kruler.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
>
>   /opt/trinity/share/applications/kde/kruler.desktop
>   /opt/trinity/share/applnk/Graphics/kruler.desktop


Actually above files are installed by:

install( FILES kruler.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES uninstall.desktop DESTINATION ${APPS_INSTALL_DIR}/Graphics 
RENAME kruler.desktop )

install() can intall two files only if there are two file arguments, like:

install( FILES file1 file2 DESTINATION /path/to/destination )

PS if you want to port to cmake indepenent apps, you can follow 
knetworkmaneger, d3lphin or amarok.

-- 
Serghei