Skip to content

Commit

Permalink
feat: use fetch content in repl
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyTubongbanua committed Sep 21, 2024
1 parent 0e28b8c commit 4c923f4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/desktop/repl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
cmake_minimum_required(VERSION 3.19)

project(repl VERSION 0.0.1 LANGUAGES C HOMEPAGE_URL https://atsign.com)
project(repl)

include(FetchContent)

find_package(atsdk REQUIRED CONFIG)
FetchContent_Declare(
atsdk
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../..
)

message(STATUS "atsdk was found")
FetchContent_MakeAvailable(atsdk)

add_executable(repl)
add_executable(repl ${CMAKE_CURRENT_LIST_DIR}/src/main.c)

target_sources(repl PRIVATE src/main.c)
target_link_libraries(repl PRIVATE atsdk::atclient)
target_link_libraries(repl PRIVATE atclient)

# the target executable will be delivered to the packages/repl/bin directory, when building the `install` target.
install(TARGETS repl DESTINATION ${CMAKE_CURRENT_LIST_DIR}/bin)

0 comments on commit 4c923f4

Please sign in to comment.