Hi Zach,

There is a way to do installing using custom install script. What you do is to create a cmake script that does whatever you want and then set on some target a pre and/or post install script:

SET_TARGET_PROPERTIES(myLib PROPERTIES PRE_INSTALL_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/some_pre_install.cmake"
 POST_INSTALL_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/some_post_install.cmake")


Then you can put in that file:
FILE(INSTALL DESTINATION "/etc" TYPE FILE FILES "/home/andy/MyProject/myetc.file")

Andy


Zachary Pincus wrote:

Hello again,

I'm wondering if there is any good way to have CMake install a particular file at an absolute position in the filesystem (not prefixed by CMAKE_INSTALL_PREFIX) during 'make install'.

It's clearly possible to send a file to any given location during the configure or build step, but it's more appropriate to do this during install, in my case.

Any thoughts? (and yes, the files do need to be at specific positions; for example in a python site-packages directory).

Thanks,

Zach
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake



--
Andy Cedilnik
Kitware Inc.

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to