summaryrefslogtreecommitdiff
path: root/ament_cmake.spec
diff options
context:
space:
mode:
Diffstat (limited to 'ament_cmake.spec')
-rw-r--r--ament_cmake.spec32
1 files changed, 31 insertions, 1 deletions
diff --git a/ament_cmake.spec b/ament_cmake.spec
index 87ebabd..c257c9b 100644
--- a/ament_cmake.spec
+++ b/ament_cmake.spec
@@ -106,7 +106,37 @@ for pkg in $SUBPKGS; do
done
%install
-# Everything installed into the buildroot by %build; nothing more to do.
+# rpmbuild wipes the buildroot before the install phase, so the cmake installs
+# done in the build phase are gone. Re-install all sub-packages from the .obj/
+# build trees (cmake --install is idempotent — no reconfigure/rebuild needed).
+SUBPKGS=" \
+ ament_cmake_core \
+ ament_cmake_export_definitions \
+ ament_cmake_export_dependencies \
+ ament_cmake_export_include_directories \
+ ament_cmake_export_libraries \
+ ament_cmake_export_link_flags \
+ ament_cmake_export_targets \
+ ament_cmake_gen_version_h \
+ ament_cmake_gmock \
+ ament_cmake_gtest \
+ ament_cmake_include_directories \
+ ament_cmake_libraries \
+ ament_cmake_python \
+ ament_cmake_target_dependencies \
+ ament_cmake_version \
+ ament_cmake_vendor_package \
+ ament_cmake_test \
+ ament_cmake \
+ ament_cmake_google_benchmark \
+ ament_cmake_pytest \
+ ament_cmake_auto \
+ ament_cmake_python_test \
+"
+
+for pkg in $SUBPKGS; do
+ DESTDIR="%{buildroot}" cmake --install ".obj/$pkg"
+done
%files
/opt/ros/%{ros_distro}