daily-core-sdk is a C++ SDK to build native client applications for the
Daily platform.
It supports Linux (x86_64 and aarch64), macOS (x86_64 and aarch64) and
Windows (x86_64).
Take a look at the examples directory.
On all platforms:
- cmake 3.16 or older.
On Windows you also need vcpkg:
Before building the example we need to declare a few environment variables:
DAILY_CORE_PATH=/path/to/daily-coreNow, make a copy of the cmake folder into your project.
On Windows also copy CMakePresets.json to your project.
We need to make sure the DAILY_CORE_PATH environment variable is defined:
#
# DAILY_CORE_PATH environment variable should be defined.
#
if (NOT DEFINED ENV{DAILY_CORE_PATH})
message(FATAL_ERROR "You must define DAILY_CORE_PATH environment variable.")
endif()
set(DAILY_CORE_PATH "$ENV{DAILY_CORE_PATH}")
And then you can add find_package() to find the library:
find_package(DailyCore)
This will expose DAILY_CORE_INCLUDE_DIRS and DAILY_CORE_LIBRARIES which you
can then use in your target application:
target_include_directories(daily_example
PRIVATE
${DAILY_CORE_INCLUDE_DIRS}
)
target_link_libraries(daily_example
PRIVATE
${DAILY_CORE_LIBRARIES}
)
cmake . -G Ninja -Bbuild -DCMAKE_BUILD_TYPE=Release
ninja -C buildInitialize the command-line development environment.
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64And then configure and build:
cmake . -Bbuild --preset vcpkg
cmake --build build --config ReleaseIt is possible to build the example for the aarch64 architecture in Linux with:
cmake . -Bbuild -DCMAKE_TOOLCHAIN_FILE=aarch64-linux-toolchain.cmake -DCMAKE_BUILD_TYPE=Release
ninja -C build