[CMake] INSTALL(TARGETS and custom target

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Apr 19 11:12:08 EDT 2007


Hello,

  After reading the documentation of INSTALL, I found out:
$ cmake --help INSTALL
...
Use the TARGETS form to install targets built within the project.
...

  Right now I have a custom macro similar in signature to ADD_EXECUTABLE:

 ADD_PI_EXECUTABLE(target_name filename.py)

  Basically this is an ADD_CUSTOM_TARGET which build an executable out
of a python script. What I would -ideally- like is that I could reuse
the INSTALL(TARGETS command. Can I do that with custom target ? It
looks like the TYPE property of a target is read only.

  On the other hand I do not like the idea of adding the proper
INSTALL(PROGRAMS within the ADD_PI_EXECUTABLE macro (confusing for the
user).

thanks for comments,
-Mathieu

Full reference can be found here:
http://gdcm.svn.sourceforge.net/viewvc/*checkout*/gdcm/Sandbox/TestPyInstaller/UsePyInstaller.cmake


More information about the CMake mailing list