0

I want to integrate the package amazon kinesis video streams webrtc SDK in buidroot. Can anyone guide me on how can I do this? I am a newbie with buildroot.

The issue is the examples available on the internet only discussion if the package has make the file only, the issue with webrtc SDK is that it has both Cmake and make file.

Executing CMake command builds the build and make command builds the application.

https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c

2 Answers2

0

Cmake projects generally use make (or some other generated build system) to build the actual code. You should follow the instructions in the buildroot manual for a "Cmake package", and it should generally work out

In the manual, it's section 18.7

https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages

Woodrow Douglass
  • 2,605
  • 3
  • 25
  • 41
  • I checked section 18.7 but it can not explain how to add a package that has both CMake and make files. To build WebRTC, first I need to run cmake .. command and after that make as follows: 1. mkdir build && cd build 2. cmake .. 3. make – BILAL ALI Aug 04 '21 at 07:40
  • Yes. That's how cmake packages work. All of them. – Woodrow Douglass Aug 19 '21 at 20:00
0

Hi I tried adding package:

this is my amazon-kinesis-video-streams-webrtc-sdk-c.mk file:

################################################################################
#
# amazon-kinesis-video-streams-webrtc-sdk-c
#
################################################################################

BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_VERSION = 1.6.0
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_SITE = $(call github,awslabs,amazon-kinesis-video-streams-webrtc-sdk-c,v$(BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_VERSION))
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_LICENSE = MIT
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_LICENSE_FILES = LICENSE-MIT
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_CONF_OPTS = -DBUILD_DEMOS=ON
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_INSTALL_STAGING = YES

$(eval $(cmake-package))

and this Config.in file:

config BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C
    bool "amazon-kinesis-video-streams-webrtc-sdk-c"
    depends on !BR2_STATIC_LIBS
    depends on BR2_TOOLCHAIN_HAS_THREADS
    help
      web-rtc

But I am getting an error that CMakeTextfile does not exist.

make amazon-kinesis-video-streams-webrtc-sdk-c-rebuild
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_staging_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_target_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_images_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_host_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_built
>>> amazon-kinesis-video-streams-webrtc-sdk-c  Extracting
>>> amazon-kinesis-video-streams-webrtc-sdk-c  Patching
>>> amazon-kinesis-video-streams-webrtc-sdk-c  Configuring
(mkdir -p /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ && cd /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ && rm -f CMakeCache.txt && PATH="/home/bilal/work/buildroot/output/host/bin:/home/bilal/work/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"  /usr/local/bin/cmake /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ -DCMAKE_TOOLCHAIN_FILE="/home/bilal/work/buildroot/output/host/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON   )
CMake Error: The source directory "/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
package/pkg-generic.mk:249: recipe for target '/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_configured' failed
make[1]: *** [/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_configured] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2