2007-08-05 13:54:42 +00:00
|
|
|
addCMakeParamsInclude()
|
|
|
|
{
|
2007-11-11 20:32:43 +00:00
|
|
|
addToSearchPath CMAKE_INCLUDE_PATH /include "" $1
|
2007-08-05 13:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
addCMakeParamsLibs()
|
|
|
|
{
|
2007-11-11 20:32:43 +00:00
|
|
|
addToSearchPath CMAKE_LIBRARY_PATH /lib "" $1
|
|
|
|
}
|
|
|
|
|
|
|
|
addCMakeModulePath()
|
|
|
|
{
|
|
|
|
addToSearchPath CMAKE_MODULE_PATH /share/cmake-2.4/Modules "" $1
|
2007-08-05 13:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fixCmakeFiles()
|
|
|
|
{
|
2007-09-20 19:27:55 +00:00
|
|
|
local replaceArgs;
|
|
|
|
echo "Fixing cmake files"
|
|
|
|
replaceArgs="-e -f -L -T /usr /FOO"
|
|
|
|
replaceArgs="${replaceArgs} -a NO_DEFAULT_PATH \"\" -a NO_SYSTEM_PATH \"\""
|
2007-09-27 14:48:09 +00:00
|
|
|
find $1 -type f -name "*.cmake" | xargs replace-literal ${replaceArgs}
|
2007-08-05 13:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cmakePostUnpack()
|
|
|
|
{
|
|
|
|
sourceRoot=$sourceRoot/build
|
|
|
|
mkdir -v $sourceRoot
|
|
|
|
echo source root reset to $sourceRoot
|
|
|
|
|
|
|
|
if [ -z "$dontFixCmake" ]; then
|
|
|
|
fixCmakeFiles .
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$configureScript" ]; then
|
|
|
|
configureScript="cmake .."
|
2007-09-20 19:27:55 +00:00
|
|
|
fi
|
|
|
|
if [ -z "$dontAddPrefix" ]; then
|
|
|
|
dontAddPrefix=1
|
2007-08-05 13:54:42 +00:00
|
|
|
configureFlags="-DCMAKE_INSTALL_PREFIX=$out $configureFlags"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2007-09-20 19:27:55 +00:00
|
|
|
|
2007-08-05 13:54:42 +00:00
|
|
|
if [ -z "$noCmakeTewaks" ]; then
|
2007-09-20 19:27:55 +00:00
|
|
|
postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}"
|
2007-08-05 13:54:42 +00:00
|
|
|
fi;
|
|
|
|
|
2007-11-11 20:32:43 +00:00
|
|
|
envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs addCMakeModulePath)
|