From d418308ee19ff4b6b1c14660306a382c131f8e53 Mon Sep 17 00:00:00 2001 From: AniruddhaKanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Thu, 5 Feb 2026 22:05:04 +0000 Subject: [PATCH] Add CMakeLists.txt file --- CMakeLists.txt | 22 ++++++++++++++++++++++ cellularInterfaceFilePaths.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 cellularInterfaceFilePaths.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..e667d864 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required( VERSION 3.15 ) + +project( FreeRTOS-Cellular-Interface LANGUAGES C ) + +# ------------------------------------------------------------------------------ +# Includes +# ------------------------------------------------------------------------------ + +include( ${CMAKE_CURRENT_LIST_DIR}/cellularInterfaceFilePaths.cmake ) + +# ------------------------------------------------------------------------------ +# Library targets +# ------------------------------------------------------------------------------ + +add_library( cellular_interface INTERFACE ) +target_sources( cellular_interface INTERFACE ${CELLULAR_COMMON_SOURCES} ) + +target_include_directories( cellular_interface INTERFACE + ${CELLULAR_INCLUDE_DIRS} + ${CELLULAR_COMMON_INCLUDE_DIRS} + ${CELLULAR_INTERFACE_INCLUDE_DIRS} + ${CELLULAR_PRIVATE_DIRS} ) diff --git a/cellularInterfaceFilePaths.cmake b/cellularInterfaceFilePaths.cmake new file mode 100644 index 00000000..c68d003b --- /dev/null +++ b/cellularInterfaceFilePaths.cmake @@ -0,0 +1,25 @@ +# This file is to add source files and include directories +# into variables so that it can be reused from different repositories +# in their Cmake based build system by including this file. +# +# Files specific to the repository such as test runner, platform tests +# are not added to the variables. + +# Cellular library source files. +set( CELLULAR_COMMON_SOURCES + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_at_core.c + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_common.c + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_common_api.c + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_3gpp_urc_handler.c + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_3gpp_api.c + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_pkthandler.c + ${CMAKE_CURRENT_LIST_DIR}/source/cellular_pktio.c ) + +# Cellular library include directory. +set( CELLULAR_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/source/include ) +set( CELLULAR_COMMON_INCLUDE_DIRS ${CELLULAR_INCLUDE_DIRS}/common ) +set( CELLULAR_PRIVATE_DIRS ${CMAKE_CURRENT_LIST_DIR}/source/include/private ) + +# Cellular interface include directory. +set( CELLULAR_INTERFACE_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/source/interface ) +