[CMake] integrating with installshield

Tyler Roscoe tyler at cryptio.net
Mon Mar 22 12:54:10 EDT 2010


I have a lot of complaints about Installshield, but I'll spare you the
whinging and just say that I need to generate Installshield setups at
the end of our CMake build. I am considering some options and was
wondering if anyone else has experience with this.

Currently, our build process is driven by a python script. I'm working
on replacing this python script with a CTest script that also
communicates with CDash, which is why I'm revisiting the Installshield
question. The python script calls the Installshield standalone builder
executable with arguments for the Installshield project file (generated
separately using the Installshield IDE) and the directory containing the
results of the CMake build.

OPTION 1: 
The easiest thing would be to have a custom command that calls the
Installshield standalone builder and to use add_dependencies() so that
when "make package" is run or the "PACKAGE" target is built in Visual
Studio, Installshield is also run. Unfortunately, we can't
add_dependencies to PACKAGE because PACKAGE is a "magic" target (see
http://www.cmake.org/Bug/view.php?id=8438).

I wonder if anyone has a good way to fake adding this dependency. For
example, I think it was Marcel who posted a workaround using a custom
command that runs cmake -P cmake_install.cmake instead of using the
INSTALL target directly. Is there a similar workaround available for
packaging? I don't see a cpack_package.cmake to invoke directly.


OPTION 2:
I can use add_test() to add a "test" that does the work of running
Installshield. An advantage of this approach is that my driver script
can verify that my build and all the unit tests have run successfully
before generating the Installshield setup.


OPTION 3:
I could try to add an Installshield generator type to CPack. I suspect
this is more work than I can/should take on right now, plus it wouldn't
be as featureful as the other CPack generators, plus the Installshield
folks might cry "licensing foul!". But maybe if it's easier than I think
this could be a good solution, and more useful to the community at
large?


Any experience with these or other approaches would be appreciated.

Thanks!
tyler


More information about the CMake mailing list