Skip to content

Commit 0c9e9f0

Browse files
Add CMakeLists.txt file (#204)
1 parent d33c005 commit 0c9e9f0

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required( VERSION 3.15 )
2+
3+
project( FreeRTOS-Cellular-Interface LANGUAGES C )
4+
5+
# ------------------------------------------------------------------------------
6+
# Includes
7+
# ------------------------------------------------------------------------------
8+
9+
include( ${CMAKE_CURRENT_LIST_DIR}/cellularInterfaceFilePaths.cmake )
10+
11+
# ------------------------------------------------------------------------------
12+
# Library targets
13+
# ------------------------------------------------------------------------------
14+
15+
add_library( cellular_interface INTERFACE )
16+
target_sources( cellular_interface INTERFACE ${CELLULAR_COMMON_SOURCES} )
17+
18+
target_include_directories( cellular_interface INTERFACE
19+
${CELLULAR_INCLUDE_DIRS}
20+
${CELLULAR_COMMON_INCLUDE_DIRS}
21+
${CELLULAR_INTERFACE_INCLUDE_DIRS}
22+
${CELLULAR_PRIVATE_DIRS} )

cellularInterfaceFilePaths.cmake

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file is to add source files and include directories
2+
# into variables so that it can be reused from different repositories
3+
# in their Cmake based build system by including this file.
4+
#
5+
# Files specific to the repository such as test runner, platform tests
6+
# are not added to the variables.
7+
8+
# Cellular library source files.
9+
set( CELLULAR_COMMON_SOURCES
10+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_at_core.c
11+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_common.c
12+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_common_api.c
13+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_3gpp_urc_handler.c
14+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_3gpp_api.c
15+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_pkthandler.c
16+
${CMAKE_CURRENT_LIST_DIR}/source/cellular_pktio.c )
17+
18+
# Cellular library include directory.
19+
set( CELLULAR_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/source/include )
20+
set( CELLULAR_COMMON_INCLUDE_DIRS ${CELLULAR_INCLUDE_DIRS}/common )
21+
set( CELLULAR_PRIVATE_DIRS ${CMAKE_CURRENT_LIST_DIR}/source/include/private )
22+
23+
# Cellular interface include directory.
24+
set( CELLULAR_INTERFACE_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/source/interface )
25+

0 commit comments

Comments
 (0)