pimoroni-pico/micropython/modules/jpegdec/micropython.cmake

19 lines
506 B
CMake
Raw Normal View History

2022-05-25 17:21:27 +01:00
add_library(usermod_jpegdec INTERFACE)
target_sources(usermod_jpegdec INTERFACE
${CMAKE_CURRENT_LIST_DIR}/jpegdec.c
${CMAKE_CURRENT_LIST_DIR}/jpeg.c
)
target_include_directories(usermod_jpegdec INTERFACE
${CMAKE_CURRENT_LIST_DIR}
)
target_compile_definitions(usermod_jpegdec INTERFACE
MODULE_JPEGDEC_ENABLED=1
)
target_link_libraries(usermod INTERFACE usermod_jpegdec)
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/jpeg.c PROPERTIES COMPILE_FLAGS "-Wno-error=unused-function")