On 9. Jun, 2010, at 17:26 , Aby Louw wrote:

> Hi,
> 
> 
> I have a Linux project that reads an initialization file on startup to
> get some file names and variables.
> 
> When doing an in-source or out of source build, I generate the
> initialization file in the CMAKE_BINARY_DIR and then also generate the C
> file that reads this file so that I know the correct path.
> 
> Now when doing a "make install" I want to install the initialization
> file on the /etc path. Therefore the initialization file path in the C
> file needs to be updated. However I do not know how to recompile the C
> target before installation happens.
> 
> I need something like a pre install or, add_dependency to install
> target, but as far as I know this is not possible. Does anybody know of
> a workaround to this problem?
> 
> regards,
> Aby

Usually I set up everything to work from the install tree but allow the user to 
override configuration file locations using an environment variable, e.g. 
SUPER_TOOL_CONFIG_DIR.

HTH

Michael

_______________________________________________
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