[CMake] install() command - order of evaluation

Sukender suky0001 at free.fr
Mon Jun 21 04:46:58 EDT 2010


Hi all,

It seems install(SCRIPT) is called before install(TARGETS) ; is there a way to change this?

Actually I try to insert a script just before packaging (ie. at the end of "INSTALL" target). I'd like to have:
- Prepare all files (install(FILES), and install(TARGETS))
- Run my script (install(SCRIPT)), so that it operates on a file created by install(TARGETS).
- Package
What I got is a script running on a non existing file (install(TARGETS) did not run before install(SCRIPT)).
(Note: my "install(SCRIPT)" command is after the "install(TARGETS)" command in my CMake files, but the order doesn't seem to be kept... or is it?)

Or is there a better way to get what I want?

Side question: Is it possible to have multiple "PACKAGE" targets (for instance "PACKAGE_NORMAL", "PACKAGE_SPECIAL", etc...)?

Many thanks.

[Using CMake 2.8.0, Win7 64 bits, MSVC 9 SP1 (project is 32 bits)]

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


More information about the CMake mailing list