[CMake] installation of properly line ended text files

Dizzy dizzy at roedu.net
Fri Aug 24 04:02:02 EDT 2007


Hello

My project in the install phase copies some configuration files. These files 
are originally using UNIX line endings (we are doing main development on UNIX 
plus SVN likes to keep them that way). However, when installing on Win32 (or 
other platform with different line endings) it would be nice if cmake could 
convert to proper line endings those files (depending on the platform of 
course).

Because some of those files are generated using configure_file() to replace 
some variable placeholders I noticed that those generated ones do have proper 
platform dependent line endings (probably because of configure_file() taking 
care of that). But I really dont see having all the config files renamed as 
file.conf.in and using configure_file() on them just for the proper line 
ending conversion as a solution. Plus that could not work so well in some 
cases where in some files I have some variable placeholders of the form 
${variable} that should be ignored by configure_file() and they are actually 
replaced at runtime by my program (those files describe some templates for 
the program).

Any idea how to do this? (I was thinking that a INSTALL(TEXT ... ) signature 
that does this could be perfect no?)

Thank you!

-- 
Mihai RUSU					Email: dizzy at roedu.net
			"Linux is obsolete" -- AST


More information about the CMake mailing list