Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Get started c demo #219

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file added demos/get_started_c/2-atKey.c
Empty file.
Empty file added demos/get_started_c/3-crud.c
Empty file.
Empty file.
Empty file added demos/get_started_c/4b-notify.c
Empty file.
Empty file added demos/get_started_c/5a-hooks.c
Empty file.
26 changes: 26 additions & 0 deletions demos/get_started_c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Minimum cmake version required by atSDK is 3.24
cmake_minimum_required(VERSION 3.24)

# Setup your cmake project - "my_project" is the name of the project
project(my_project)

# Some additional CMake modules we need
include(FetchContent)
include(GNUInstallDirs)

# Download the atSDK
FetchContent_Declare(
atsdk
GIT_REPOSITORY https://github.com/atsign-foundation/at_c.git
GIT_TAG
trunk #TODO: it is recommended that you pin this to a particular version
)
# Install the atSDK
FetchContent_MakeAvailable(atsdk)
install(TARGETS atclient atchops atlogger)

set(programs)
foreach(program ${programs})
add_executable(${program} ${CMAKE_CURRENT_LIST_DIR}/${program}.c)
target_link_libraries(${program} PRIVATE atsdk::atclient)
endforeach()