build-style/cmake.sh: specify paths as type PATH

specifying the type prevents cmake to converthing the paths
relative to the CWD

cmake documentation:

Furthermore, if the <type> is PATH or FILEPATH and the <value> provided
on the command line is a relative path, then the set command will treat
the path as relative to the current working directory and convert it to an absolute path.
This commit is contained in:
John 2023-10-13 17:11:08 +02:00 committed by John Zimmermann
parent 5148cbc6a1
commit 13b085be7c
1 changed files with 4 additions and 4 deletions

View File

@ -52,10 +52,10 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
_EOF
cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=${wrksrc}/${build_wrksrc}/${cmake_builddir}/cross_${XBPS_CROSS_TRIPLET}.cmake"
fi
cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr"
cmake_args+=" -DCMAKE_INSTALL_PREFIX:PATH=/usr"
cmake_args+=" -DCMAKE_BUILD_TYPE=None"
cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib${XBPS_TARGET_WORDSIZE}"
cmake_args+=" -DCMAKE_INSTALL_SYSCONFDIR=/etc"
cmake_args+=" -DCMAKE_INSTALL_LIBDIR:PATH=lib${XBPS_TARGET_WORDSIZE}"
cmake_args+=" -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc"
if [ "$CROSS_BUILD" ]; then
cmake_args+=" -DQT_HOST_PATH=/usr"
@ -69,7 +69,7 @@ _EOF
>> cross_${XBPS_CROSS_TRIPLET}.cmake
fi
cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
cmake_args+=" -DCMAKE_INSTALL_SBINDIR:PATH=bin"
export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
# Remove -pipe: https://gitlab.kitware.com/cmake/cmake/issues/19590