Expands SDK support to 8 additional languages/frameworks: - Java SDK with Maven/OkHttp/Jackson - Kotlin SDK with Gradle/Ktor/kotlinx.serialization - Swift SDK with Swift Package Manager/async-await - C SDK with CMake/libcurl - C++ SDK with CMake/Modern C++20 - C# SDK with .NET 8.0/HttpClient - Ruby SDK with Bundler/Faraday - Rust SDK with Cargo/reqwest/tokio All SDKs include: - Tensor operations (matmul, conv2d, attention) - LLM inference with streaming support - Model registry, pricing, and usage APIs - Builder patterns where idiomatic - Full type safety
68 lines
1.5 KiB
CMake
68 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(synor_compute VERSION 0.1.0 LANGUAGES C)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
|
|
# Options
|
|
option(BUILD_SHARED_LIBS "Build shared library" ON)
|
|
option(BUILD_TESTS "Build tests" ON)
|
|
option(BUILD_EXAMPLES "Build examples" ON)
|
|
|
|
# Find dependencies
|
|
find_package(CURL REQUIRED)
|
|
|
|
# Library sources
|
|
set(SYNOR_SOURCES
|
|
src/synor_compute.c
|
|
)
|
|
|
|
# Create library
|
|
add_library(synor_compute ${SYNOR_SOURCES})
|
|
|
|
target_include_directories(synor_compute
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>
|
|
)
|
|
|
|
target_link_libraries(synor_compute
|
|
PRIVATE
|
|
CURL::libcurl
|
|
m
|
|
)
|
|
|
|
# Set library properties
|
|
set_target_properties(synor_compute PROPERTIES
|
|
VERSION ${PROJECT_VERSION}
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
PUBLIC_HEADER include/synor_compute.h
|
|
)
|
|
|
|
# Installation
|
|
include(GNUInstallDirs)
|
|
|
|
install(TARGETS synor_compute
|
|
EXPORT synor_compute-targets
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
)
|
|
|
|
install(EXPORT synor_compute-targets
|
|
FILE synor_compute-targets.cmake
|
|
NAMESPACE synor::
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/synor_compute
|
|
)
|
|
|
|
# Tests
|
|
if(BUILD_TESTS)
|
|
enable_testing()
|
|
add_subdirectory(tests EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
# Examples
|
|
if(BUILD_EXAMPLES)
|
|
add_subdirectory(examples EXCLUDE_FROM_ALL)
|
|
endif()
|