Alexander Neundorf wrote:
On Monday 16 February 2009, Andreas Pakulat wrote:
On 16.02.09 21:12:46, Kermit Mei wrote:
How can I install something into an absolute directory?
For example, I want to install the directory under /usr/share.
When I use the following command:
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/dict/mydir DESTINATION share)

'mydir' may be installed into /usr/local/share, if I run
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
Thats correct and the right thing to happen.

How to avoid it, and guarantee it can be install under /usr/share
whatevery I
pointed with cmake PREFIX ?
Your app should not need that, in particular nothing that builds from
source should install into a directory thats controlled by a distributions
packaging system. Apart from that, something like this would probably break
how distributions build a package from such sources.

Andreas is right, but if you really want it, you can simply put the absolute path as the destination:
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/dict/mydir DESTINATION /usr/share)

(haven't tried this with DIRECTORY mode, but works for files and targets).

Alex

Thanks;p

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to