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

19 lines
506 B
CMake

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")