Building the C++ SDK Library
Use the provided build scripts to compile the C++ SDK library and stage the output files: build_and_stage.sh on macOS and Linux, build_and_stage.bat on Windows. The scripts set up, build and stage the SDK along with its examples.
To build the SDK manually, jump to the Manual Build Instructions below.
Automated Build with Script
Section titled “Automated Build with Script”-
For macOS/Linux: Run the
build_and_stage.shscript:./build_and_stage.sh -
For Windows: Run the
build_and_stage.batscript:build_and_stage.bat
These scripts will handle the build process, including cleaning up previous builds, creating the necessary directories, running CMake, and building both the library and example applications. After the script runs, the build output is placed in the staging directory, as shown below:
macOS Staging Directory Example:
staging/├── docs/├── examples/│ ├── i3c_cccs/│ ├── i3c_ibis/│ ├── i3c_ICM42605/│ ├── list_devices/│ ├── mock_notifications/│ ├── nova_breathing_leds/│ ├── sample_app_using_sample_library/│ ├── sample_library/│ ├── supernova_101/│ ├── supernova_i2c/│ ├── supernova_i2c_benchmark/│ └── supernova_spi/├── include/│ ├── bridge_reader.h│ ├── BridgeReader_windows.h│ ├── CommandDispatcher.h│ ├── CommandManager.h│ ├── CommandRequest.h│ ├── CommandResponse.h│ └── definitions.h└── lib/ ├── libbmc_sdk_static.a ├── libbmc_sdk.1.1.0.dylib ├── libbmc_sdk.1.dylib ├── libbmc_sdk.dylibManual Build Instructions
Section titled “Manual Build Instructions”Prerequisites:
Section titled “Prerequisites:”- CMake: Ensure CMake is installed on the system.
- On macOS:
brew install cmake - On Linux: Use the package manager (
apt-get,yum, etc.) to install CMake, e.g.,sudo apt-get install cmake. - On Windows: Download and install CMake from here.
- On macOS:
- Bridge Executable: Ensure the
bmcbridgeexecutable is installed and accessible in the system’sPATH. If it’s not available, follow the installation guide for BMC Bridge in the documentation. - Visual Studio (Windows only): Visual Studio 2022 or a similar version with C++ development tools must be installed.
macOS & Linux Instructions:
Section titled “macOS & Linux Instructions:”-
Clone the Repository
Start by cloning the SDK repository from GitHub:git clone https://github.com/binhollc/MissionControlTowerSDK.gitcd MissionControlTowerSDK -
Clean Previous Builds (if any)
If the SDK was built previously, clean up old build files before starting a new build.-
If the
builddirectory exists, remove it:rm -rf build -
If the
stagingdirectory exists, remove it:rm -rf staging
-
-
Create Staging and Build Directories
-
Create the
stagingdirectory to store the built library:mkdir staging -
Create a new
builddirectory where the compilation process will occur:mkdir buildcd build
-
-
Run CMake to Configure the Build
Use CMake to generate the necessary build files. Specify the build type asRelease:cmake -DCMAKE_BUILD_TYPE=Release .. -
Build the C++ SDK Library
After configuring, initiate the build process:cmake --build . --config Release --target install -
Return to the Project Directory
After the build is complete, navigate back to the root directory:cd ..
Windows Instructions:
Section titled “Windows Instructions:”-
Clone the Repository
Open the Command Prompt and clone the SDK repository:git clone https://github.com/binhollc/MissionControlTowerSDK.gitcd MissionControlTowerSDK -
Set Up Staging and Clean Previous Builds (if any)
If a previous build exists, clean it:-
Remove the
stagingdirectory if it exists:rmdir /S /Q stagingmkdir staging -
Remove the
builddirectory if it exists:rmdir /S /Q buildmkdir build
-
-
Change to the Build Directory
Navigate into the newly createdbuilddirectory:cd build -
Run CMake to Configure the Build
Configure the build using CMake with Visual Studio as the generator. Set the platform (win32orx64), defaulting towin32if none is provided:-
For
win32builds:cmake -DCMAKE_BUILD_TYPE=Release .. -G "Visual Studio 17 2022" -A win32 -
For
x64builds:cmake -DCMAKE_BUILD_TYPE=Release .. -G "Visual Studio 17 2022" -A x64
-
-
Build the C++ SDK Library
Once configured, compile the SDK library:cmake --build . --config Release --target install -
Return to the Project Directory
After building, return to the project root directory:cd ..
Output:
Section titled “Output:”After following these steps, the compiled SDK library and example applications will be stored in the staging directory on all platforms. Link this library to a project or distribute it as needed.

