[CMake] Name of Install target
James Bigler
bigler at cs.utah.edu
Thu Feb 14 18:14:59 EST 2008
>> I want to create a custom command or target that is dependent on the
>> install target. What is the name of the install target. I tried
>> "install", but that didn't seem to do what I needed:
>
> This isn't supported currently.
> What do you want to do exactly ?
> Does INSTALL(SCRIPT ) help ?
> Could you add a custom target e.g. my_install which would first do
> install and
> then do something more ?
I'm trying to use the command line program platypus to generate an
app that contains my executable, my own libraries, my own files, and
a set of third party libraries and files. Platypus (http://
www.sveinbjorn.org/platypus) creates an app from a script. My script
sets up all sorts of environment variables as well as making sure X
is running and then starts up my program. The nice thing about this
is that all my libraries and thirdparty stuff is in a single App. No
need to install all the libraries independently of the executable
that needs it.
I've set up install targets for all of my own built stuff. I even
have a shell script that builds my app, but the script needs to run
after "make install". I looked up the INSTALL(SCRIPT ) stuff you
recommended, but I need this script to run after *all* the install
targets are run. I just thought there would be a target that
corresponds to the "make install" target.
I guess I could make a target that manually runs "make install" and
then my script. I just wondered if there was a more elegant solution.
James
Here is the shell script:
#!/bin/bash
PLATYPUS=/usr/local/bin/platypus
"$PLATYPUS" -a 'SCIRun' -t 'Shell' -o 'None' -u 'SCI Institute' -p '/
bin/sh' -V '3.1.0' -s '????' -I 'org.SCI.SCIRun' -i /Users/bigler/
cibc/SCIRun/src/main/SCIRun-icon.icns '/Users/bigler/cibc/SCIRun/
install/startup.sh' SCIRun.app
echo "Created app directory"
# Now copy the right bits into the script
RESOURCES=$PROGRAM_NAME/Contents/Resources
CMAKE_INSTALL_PREFIX=/Users/bigler/cibc/SCIRun/install/test-shared
echo "Copying SCIRun binaries and libraries from $INSTALL_DIR"
cp -Rp $INSTALL_DIR/* $RESOURCES
# Copy thirdparty
SCIRUN_THIRDPARTY_DIR=/Users/bigler/cibc/SCIRun/thirdparty.bin/3.1.0/
Darwin-i386/gcc-4.0.1-32bit
echo "Copying Thirdparty from $SCIRUN_THIRDPARTY_DIR"
mkdir $RESOURCES/thirdparty
for T in SCIRUN_THIRDPARTY_VERSION bin include lib share; do
cp -Rp $SCIRUN_THIRDPARTY_DIR/$T $RESOURCES/thirdparty;
done;
# Clean out some of the thirdparty cruft
find $RESOURCES/thirdparty -name "*.a" -delete
More information about the CMake
mailing list