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

20 lines
612 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}/jpegdec.cpp
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/jpegdec/JPEGDEC.cpp
2022-05-25 17:21:27 +01:00
)
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}/../../../libraries/jpegdec/JPEGDEC.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=unused-function")