pico-sdk/src/host/pico_platform/CMakeLists.txt

25 lines
767 B
CMake
Raw Normal View History

2021-01-20 16:44:27 +00:00
if (NOT TARGET pico_platform_headers)
add_library(pico_platform_headers INTERFACE)
target_compile_definitions(pico_platform_headers INTERFACE
PICO_NO_HARDWARE=1
PICO_ON_DEVICE=0
PICO_BUILD=1
)
target_include_directories(pico_platform_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
endif()
if (NOT TARGET pico_platform)
add_library(pico_platform INTERFACE)
target_sources(pico_platform INTERFACE
${CMAKE_CURRENT_LIST_DIR}/platform_base.c
)
target_link_libraries(pico_platform INTERFACE pico_platform_headers pico_bit_ops ${PICO_PLATFORM_EXTRA_LIBRARIES})
endif()
function(pico_add_platform_library TARGET)
target_link_libraries(pico_platform INTERFACE ${TARGET})
endfunction()