RadioLib/examples/NonArduino/Raspberry/CMakeLists.txt

23 wiersze
814 B
CMake
Czysty Zwykły widok Historia

2023-04-30 20:10:48 +00: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)
2023-05-16 16:12:45 +00:00
# if you did not build RadioLib as shared library (see wiki),
2023-05-06 17:34:41 +00:00
# you will have to add it as source directory
# the following is just an example, yours will likely be different
2023-05-16 16:12:45 +00:00
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../../../RadioLib" "${CMAKE_CURRENT_BINARY_DIR}/RadioLib")
2023-04-30 20:10:48 +00:00
# add the executable
add_executable(${PROJECT_NAME} main.cpp)
# link both libraries
2024-06-14 18:49:19 +00:00
target_link_libraries(${PROJECT_NAME} RadioLib lgpio)
2023-04-30 20:10:48 +00:00
# you can also specify RadioLib compile-time flags here
2024-05-03 20:05:44 +00:00
#target_compile_definitions(RadioLib PUBLIC RADIOLIB_DEBUG_BASIC RADIOLIB_DEBUG_SPI)
#target_compile_definitions(RadioLib PUBLIC RADIOLIB_DEBUG_PORT=stdout)