2007-08-05 15:54:42 +02:00
|
|
|
addCMakeParamsInclude()
|
|
|
|
{
|
2007-12-01 21:05:26 +01:00
|
|
|
addToSearchPath CMAKE_INCLUDE_PATH /include "" $1
|
2007-08-05 15:54:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
addCMakeParamsLibs()
|
|
|
|
{
|
2007-12-01 21:05:26 +01:00
|
|
|
addToSearchPath CMAKE_LIBRARY_PATH /lib "" $1
|
|
|
|
}
|
|
|
|
|
|
|
|
addCMakeModulePath()
|
|
|
|
{
|
|
|
|
addToSearchPath CMAKE_MODULE_PATH /share/cmake-2.4/Modules "" $1
|
2007-08-05 15:54:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fixCmakeFiles()
|
|
|
|
{
|
2007-09-20 21:27:55 +02: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 16:48:09 +02:00
|
|
|
find $1 -type f -name "*.cmake" | xargs replace-literal ${replaceArgs}
|
2007-08-05 15:54:42 +02: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 21:27:55 +02:00
|
|
|
fi
|
|
|
|
if [ -z "$dontAddPrefix" ]; then
|
|
|
|
dontAddPrefix=1
|
2007-08-05 15:54:42 +02:00
|
|
|
configureFlags="-DCMAKE_INSTALL_PREFIX=$out $configureFlags"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2007-09-20 21:27:55 +02:00
|
|
|
|
2007-08-05 15:54:42 +02:00
|
|
|
if [ -z "$noCmakeTewaks" ]; then
|
2007-09-20 21:27:55 +02:00
|
|
|
postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}"
|
2007-08-05 15:54:42 +02:00
|
|
|
fi;
|
|
|
|
|
2007-12-01 21:05:26 +01:00
|
|
|
envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs addCMakeModulePath)
|