CPack/RPM: Use CMAKE_COMMAND to reference cmake executable

Ensure we use the `cmake` corresponding to the running `cpack`
even if it is not first in `PATH` or has had its name changed.
This was accidentally left out in commit v3.7.0-rc1~81^2 (CPack/RPM:
Generate source rpm (SRPM) packages on demand, 2016-09-19).
This commit is contained in:
Daniel Wyatt
2018-06-23 07:42:42 -04:00
committed by Brad King
parent 4b7e9cabc2
commit 611ad19499

View File

@@ -1525,7 +1525,7 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES}
%build
mkdir cpack_rpm_build_dir
cd cpack_rpm_build_dir
cmake ${CPACK_RPM_SOURCE_PKG_BUILD_PARAMS} -DCPACK_PACKAGING_INSTALL_PREFIX=${CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX} ../${CPACK_PACKAGE_FILE_NAME}
'${CMAKE_COMMAND}' ${CPACK_RPM_SOURCE_PKG_BUILD_PARAMS} -DCPACK_PACKAGING_INSTALL_PREFIX=${CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX} ../${CPACK_PACKAGE_FILE_NAME}
make %{?_smp_mflags}" # %{?_smp_mflags} -> -j option
)
set(TMP_RPM_INSTALL