On Wed, 2012-02-08 at 11:35 +0000, Jon Stockill wrote: > I'm currently updating some jenkins build scripts for cmake rather than > autoconf, and I'm having problems getting the build to link against > local copies of all the dependencies. Is there a simple way of > specifying where to look for these rather than having to specify the > path to each individual library file (which from the cmake output seems > like it might be the only way).
Hi Jon, A HOT extract from my current 1.3.8 'makefg' script ;=)) Not yet published as still testing some options like - FGCM_OPTS="$FGCM_OPTS -D JPEG_FACTORY:BOOL=ON" But for the dependencies OSG, SG, and the recently added PLIB when only installed 'locally'... ADDPLIBDIRS=0 # If PLIB is installed locally, then ADDPLIBDIRS=1 FGCM_OPTS="$FGCM_OPTS -D CMAKE_VERBOSE_MAKEFILE=TRUE" if [ "$ADDPLIBDIRS" = "1" ]; then FGCM_OPTS="$FGCM_OPTS -D PLIB_LIBRARIES=$INSTALL_DIR_PLIB/lib" FGCM_OPTS="$FGCM_OPTS -D PLIB_INCLUDE_DIR= $INSTALL_DIR_PLIB/include" fi FGCM_OPTS="$FGCM_OPTS -D CMAKE_INSTALL_PREFIX=$INSTALL_DIR_FGFS" For SG installed locally I use an export... like makefg: Done 'export SIMGEAR_DIR=/media/Disk2/FG/fg20/install/simgear' For OSG installed locally I use an export... like makefg: Done 'export OSG_DIR=/media/Disk2/FG/fg20/install/OSGtrunk' then... echo2 "$BN: Will do 'cmake $FGCM_OPTS $FGFS_SOURCE_PATH'" cmake $FGCM_OPTS $FGFS_SOURCE_PATH The actual cmake command is quite simple - makefg: Will do 'cmake -D CMAKE_VERBOSE_MAKEFILE=TRUE \ -D CMAKE_INSTALL_PREFIX=/media/Disk2/FG/fg20/install/flightgear \ /media/Disk2/FG/fg20/flightgear' I had tried setting SG LIBRARIES and INCLUDE, like PLIB, but this did not work for me - if [ "$ADDSGDIRS" = "1" ]; then FGCM_OPTS="$FGCM_OPTS -D SIMGEAR_LIBRARIES= $INSTALL_DIR_SIMGEAR/lib" FGCM_OPTS="$FGCM_OPTS -D SIMGEAR_INCLUDE_DIR= $INSTALL_DIR_SIMGEAR/include" fi Not sure why this fails... maybe it should be like - SIMGEAR_LIBRARIES:PATH=$INSTALL_DIR_SIMGEAR/lib or something... And also had some success with - FGCM_OPTS="$FGCM_OPTS -D CMAKE_PREFIX_PATH=$INSTALL_DIR_SIMGEAR" but seemed unnecessary once I do the SIMGEAR_DIR 'export'... And more or less the same for terragear-cs except no need for OSG stuff... HTH, but maybe other with more cmake savvy can do better ;=)) Regards, Geoff. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel