2007-08-05 15:54:42 +02:00
|
|
|
addCMakeParamsInclude()
|
|
|
|
{
|
2008-02-21 00:02:41 +01:00
|
|
|
addToSearchPath CMAKE_INCLUDE_PATH /include "" $1
|
2007-08-05 15:54:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
addCMakeParamsLibs()
|
|
|
|
{
|
2008-02-21 00:02:41 +01:00
|
|
|
addToSearchPath CMAKE_LIBRARY_PATH /lib "" $1
|
2007-12-01 21:05:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
addCMakeModulePath()
|
|
|
|
{
|
2008-02-21 00:02:41 +01:00
|
|
|
addToSearchPath CMAKE_MODULE_PATH /share/cmake-2.4/Modules "" $1
|
2007-08-05 15:54:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fixCmakeFiles()
|
|
|
|
{
|
2008-02-21 00:02:41 +01:00
|
|
|
local replaceArgs;
|
|
|
|
echo "Fixing cmake files"
|
|
|
|
replaceArgs="-e -f -L -T /usr /FOO"
|
|
|
|
replaceArgs="${replaceArgs} -a NO_DEFAULT_PATH \"\" -a NO_SYSTEM_PATH \"\""
|
|
|
|
find $1 -type f -name "*.cmake" | xargs replace-literal ${replaceArgs}
|
2007-08-05 15:54:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cmakePostUnpack()
|
|
|
|
{
|
2008-02-21 00:02:41 +01:00
|
|
|
sourceRoot=$sourceRoot/build
|
|
|
|
mkdir -v $sourceRoot
|
|
|
|
echo source root reset to $sourceRoot
|
|
|
|
|
|
|
|
if [ -z "$dontFixCmake" ]; then
|
|
|
|
fixCmakeFiles .
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$configureScript" ]; then
|
|
|
|
configureScript="cmake .."
|
|
|
|
fi
|
|
|
|
if [ -z "$dontAddPrefix" ]; then
|
|
|
|
dontAddPrefix=1
|
|
|
|
configureFlags="-DCMAKE_INSTALL_PREFIX=$out $configureFlags"
|
|
|
|
fi
|
2007-08-05 15:54:42 +02:00
|
|
|
}
|
|
|
|
|
2007-09-20 21:27:55 +02:00
|
|
|
|
2007-08-05 15:54:42 +02:00
|
|
|
if [ -z "$noCmakeTewaks" ]; then
|
2008-02-21 00:02:41 +01: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)
|