[CMake] How can I install something into an absolute directory?

Kermit Mei kermit.mei at gmail.com
Mon Feb 16 08:12:46 EST 2009


Hello, community!

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 ..

How to avoid it, and guarantee it can be install under /usr/share 
whatevery I
pointed with cmake PREFIX ?

Thanks.

Kermit Mei


More information about the CMake mailing list