summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorTom Hughes <tomtheengineer@gmail.com>2012-03-27 19:43:35 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-03-27 19:43:35 (GMT)
commit3a0c60d3bf8dab326e7dc409632a70ac63e358c1 (patch)
tree690e2fe9fbdf355108af4c6b9f24dc6ffa340cfa /Modules/CPackRPM.cmake
parent58db6ac2991ee00536f7aded84811f1e3eead906 (diff)
downloadCMake-3a0c60d3bf8dab326e7dc409632a70ac63e358c1.zip
CMake-3a0c60d3bf8dab326e7dc409632a70ac63e358c1.tar.gz
CMake-3a0c60d3bf8dab326e7dc409632a70ac63e358c1.tar.bz2
Override topdir from rpm command line seems necessary on Amazon linux.
This modification should be harmless on other distro. Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 442d7c4..cba746f 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -899,6 +899,7 @@ IF(RPMBUILD_EXECUTABLE)
# Now call rpmbuild using the SPECFILE
EXECUTE_PROCESS(
COMMAND "${RPMBUILD_EXECUTABLE}" -bb
+ --define "_topdir ${CPACK_RPM_DIRECTORY}"
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
"${CPACK_RPM_BINARY_SPECFILE}"
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"