LilyGo-LoRa-Series/lib/RadioLib/examples/NonArduino/Raspberry/CMakeLists.txt

22 lines
814 B
Text
Raw Normal View History

2023-05-12 11:27:13 +08:00
cmake_minimum_required(VERSION 3.18)
# create the project
project(rpi-sx1261)
# when using debuggers such as gdb, the following line can be used
#set(CMAKE_BUILD_TYPE Debug)
2024-05-12 10:43:40 +08:00
# if you did not build RadioLib as shared library (see wiki),
2023-05-12 11:27:13 +08:00
# you will have to add it as source directory
# the following is just an example, yours will likely be different
2024-05-12 10:43:40 +08:00
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../../../RadioLib" "${CMAKE_CURRENT_BINARY_DIR}/RadioLib")
2023-05-12 11:27:13 +08:00
# add the executable
add_executable(${PROJECT_NAME} main.cpp)
# link both libraries
2024-06-21 17:26:31 +08:00
target_link_libraries(${PROJECT_NAME} RadioLib lgpio)
2023-05-12 11:27:13 +08:00
# you can also specify RadioLib compile-time flags here
2024-05-14 14:09:37 +08:00
#target_compile_definitions(RadioLib PUBLIC RADIOLIB_DEBUG_BASIC RADIOLIB_DEBUG_SPI)
#target_compile_definitions(RadioLib PUBLIC RADIOLIB_DEBUG_PORT=stdout)