feat: add webp support (#1384)

This commit is contained in:
leejet authored and GitHub committed 2026-04-02 01:36:11 +08:00
1 parent 99c1de379b
commit 87ecb95cbc
17 files changed
+1319 -597

No files matched your search

+9 -2
View File
@@ -56,7 +56,11 @@ else()
message(STATUS "Frontend disabled or directory not found: ${FRONTEND_DIR}")
endif()
add_executable(${TARGET} main.cpp)
add_executable(${TARGET}
../common/log.cpp
../common/media_io.cpp
main.cpp
)
if(HAVE_FRONTEND_BUILD)
add_dependencies(${TARGET} ${TARGET}_frontend)
@@ -70,10 +74,13 @@ endif()
install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE stable-diffusion ${CMAKE_THREAD_LIBS_INIT})
if(SD_WEBP)
target_link_libraries(${TARGET} PRIVATE webp libwebpmux)
endif()
# due to httplib; it contains a pragma for MSVC, but other things need explicit flags
if(WIN32 AND NOT MSVC)
target_link_libraries(${TARGET} PRIVATE ws2_32)
endif()
target_compile_features(${TARGET} PUBLIC c_std_11 cxx_std_17)
target_compile_features(${TARGET} PUBLIC c_std_11 cxx_std_17)