-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial CMake files for pico-sdk (#174)
* Add CMakeLists.txt that defines RF24Network as an INTERFACE library and works at least with the pico-sdk * Change the CMake-mechanism to match what we have in the RF24 library * Rename files so it might work with older versions of cmake as well
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Check if we are building a pico-sdk based project | ||
# (or more exactly: if we just got included in a pico-sdk based project) | ||
if (PICO_SDK_PATH) | ||
# If so, load the relevant CMakeLists-file but don't do anything else | ||
include(${CMAKE_CURRENT_LIST_DIR}/usePicoSDK.cmake) | ||
return() | ||
endif() | ||
|
||
## TODO: Non-PicoSDK builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Include this file if you want to use the RF24Network library | ||
## in YOUR (pico-sdk based) project. | ||
|
||
cmake_minimum_required(VERSION 3.12) | ||
|
||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# Define the RF24Network library | ||
add_library(RF24Network INTERFACE) | ||
|
||
target_sources(RF24Network INTERFACE | ||
${CMAKE_CURRENT_LIST_DIR}/RF24Network.cpp | ||
) | ||
|
||
target_include_directories(RF24Network INTERFACE | ||
${CMAKE_CURRENT_LIST_DIR}/ | ||
) |