-
Notifications
You must be signed in to change notification settings - Fork 64
Component Setup
Manuel Bl edited this page Aug 2, 2020
·
3 revisions
You have several options how to integrate ttn-esp32 as a component into your project:
That's the option presented on the Get Started page:
- Download ttn-esp32 as a zip file from https://github.com/manuelbl/ttn-esp32/archive/master.zip
- Unzip the file and rename the unpacked folder to ttn-esp32
- Copy the ttn-esp32 folder into the components folder of your project
Instead of copying the contents of the zip file, you add it to the build system variable EXTRA_COMPONENT_DIRS
in CMakeLists.txt
.
- Download ttn-esp32 as a zip file from https://github.com/manuelbl/ttn-esp32/archive/master.zip
- Unzip the file and rename the folder to ttn-esp32
- Edit
CMakeLists.txt
in the root directory of your project soEXTRA_COMPONENT_DIRS
includes the path to the downloaded folder:
list(APPEND EXTRA_COMPONENT_DIRS "/Users/me/Documents/ttn-esp32")
Instead of downloading the zip file, you can clone the ttn-esp32 repository. That way, you can easily stay up-to-date with the latest enhancements and bug fixes. The ttn-esp32 is referenced by the build system variable EXTRA_COMPONENT_DIRS
in CMakeLists.txt
.
git clone https://github.com/manuelbl/ttn-esp32.git
- Edit
CMakeLists.txt
in the root directory of your project soEXTRA_COMPONENT_DIRS
includes the path to the downloaded folder:
list(APPEND EXTRA_COMPONENT_DIRS "/Users/me/Documents/ttn-esp32")
If your app's source code is already managed by git, then you can add ttn-esp32 as a git submodule:
git submodule add https://github.com/manuelbl/ttn-esp32.git components/ttn-esp32
git submodule update --init --recursive