1.4. Integrating into your application

This page describes how to integrate the Proximie SDK into your C++ application.

Note that the included samples demonstrate how to integrate the Proximie SDK into an application; see Sample applications for details on where to find them, and how to build them.

1.4.1. C++ Versions

The SDK is compiled with C++ 14 to maximise compatibility balanced with modern C++ features. Future releases of the SDK should support richer C++ features such as C++ 20 coroutines and concepts.

1.4.2. CMake configuration

This section outlines the CMake commands required to include and link against the Proximie SDK.

Note that the included samples include CMake configurations that demonstrate how to include and link against the Proximie SDK; see Sample applications for details on where to find them, and how to build them.

How you find, include and link against the Proximie SDK will depend on how you have set up your environment.

1.4.2.1. APT-based installation

If you have installed the Proximie SDK from our public APT repository, you can use CMake’s find_package command to find the SDK; the APT packages include CMake configuration files that allow CMake to automatically find the SDK.

find_package(PxSDK CONFIG REQUIRED)

You can then add the SDK include directory to your target’s include directories:

target_include_directories(${PROJECT_NAME}
    PRIVATE
        ${PxSDK_INCLUDE_DIR}
)

and link against the SDK library and other dependencies:

target_link_libraries(${PROJECT_NAME}
    PUBLIC
        PxSDK::PxSDK_Shared
        ${Boost_LIBRARIES}
        OpenSSL::SSL OpenSSL::Crypto
        PkgConfig::GLIB
        PkgConfig::GSTREAMER
        PkgConfig::GST_APP
        PkgConfig::GST_SDP
        PkgConfig::GST_VIDEO
        PkgConfig::GST_WEBRTC
)

1.4.2.2. Installation from SDK release archive

If you have downloaded the SDK release archive, you will need to specify the include and library directories manually in your CMake configuration, e.g.:

target_include_directories(${PROJECT_NAME}
    PRIVATE
        /path/to/proximie-sdk/include
)

and:

target_link_libraries(${PROJECT_NAME}
    PUBLIC
        /path/to/proximie-sdk/lib/libPxSDK.so
        ${Boost_LIBRARIES}
        OpenSSL::SSL OpenSSL::Crypto
        PkgConfig::GLIB
        PkgConfig::GSTREAMER
        PkgConfig::GST_APP
        PkgConfig::GST_SDP
        PkgConfig::GST_VIDEO
        PkgConfig::GST_WEBRTC
)

1.4.2.3. Resolving other dependency packages

You will also need to resolve the other dependencies of the Proximie SDK, which include Boost, OpenSSL, and various GStreamer packages.

find_package(Boost 1.86 REQUIRED COMPONENTS filesystem url)
find_package(OpenSSL REQUIRED)
find_package(PkgConfig)
pkg_search_module(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(GSTREAMER REQUIRED IMPORTED_TARGET gstreamer-1.0)
pkg_check_modules(GST_APP REQUIRED IMPORTED_TARGET gstreamer-app-1.0)
pkg_check_modules(GST_SDP REQUIRED IMPORTED_TARGET gstreamer-sdp-1.0)
pkg_check_modules(GST_VIDEO REQUIRED IMPORTED_TARGET gstreamer-video-1.0)
pkg_check_modules(GST_WEBRTC REQUIRED IMPORTED_TARGET gstreamer-webrtc-1.0)

1.4.3. Using the SDK in your application

How you then use the Proximie SDK in your application will depend on your goals and application design. The included samples demonstrate various ways to use the Proximie SDK; see Sample applications for details on where to find them, and how to build them.