mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-24 12:14:18 +00:00
add submodule libwebp for #273
This commit is contained in:
parent
47a5b38ada
commit
884b5f2e6f
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,3 +10,6 @@
|
||||
[submodule "third_party/duktape"]
|
||||
path = third_party/duktape
|
||||
url = https://github.com/aseprite/duktape.git
|
||||
[submodule "third_party/libwebp"]
|
||||
path = third_party/libwebp
|
||||
url = https://chromium.googlesource.com/webm/libwebp
|
||||
|
@ -40,6 +40,7 @@ option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
|
||||
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
|
||||
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
|
||||
option(USE_SHARED_LIBLOADPNG "Use your installed copy of libloadpng" off)
|
||||
option(USE_SHARED_LIBWEBP "Use your installed copy of libwebp" off)
|
||||
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
|
||||
option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off)
|
||||
option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)
|
||||
@ -106,6 +107,7 @@ set(LIBFREETYPE_DIR ${CMAKE_SOURCE_DIR}/third_party/freetype)
|
||||
set(LIBJPEG_DIR ${CMAKE_SOURCE_DIR}/third_party/jpeg)
|
||||
set(LIBPNG_DIR ${CMAKE_SOURCE_DIR}/third_party/libpng)
|
||||
set(LOADPNG_DIR ${CMAKE_SOURCE_DIR}/third_party/loadpng)
|
||||
set(LIBWEBP_DIR ${CMAKE_SOURCE_DIR}/third_party/libwebp)
|
||||
set(MONGOOSE_DIR ${CMAKE_SOURCE_DIR}/third_party/mongoose)
|
||||
set(PIXMAN_DIR ${CMAKE_SOURCE_DIR}/third_party/pixman)
|
||||
set(SIMPLEINI_DIR ${CMAKE_SOURCE_DIR}/third_party/simpleini)
|
||||
@ -170,6 +172,19 @@ endif()
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code
|
||||
|
||||
# libwebp
|
||||
if(USE_SHARED_LIBWEBP)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(WEBP libwebp)
|
||||
if(NOT WEBP_FOUND)
|
||||
message(FATAL_ERROR "libwebp not found")
|
||||
endif()
|
||||
else()
|
||||
set(WEBP_LIBRARIES webp)
|
||||
set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
|
||||
endif()
|
||||
include_directories(${WEBP_INCLUDE_DIR})
|
||||
|
||||
# tinyxml
|
||||
if(USE_SHARED_TINYXML)
|
||||
find_library(TINYXML_LIBRARY NAMES tinyxml)
|
||||
|
4
third_party/CMakeLists.txt
vendored
4
third_party/CMakeLists.txt
vendored
@ -20,6 +20,10 @@ if(NOT USE_SHARED_LIBPNG)
|
||||
add_subdirectory(libpng)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_LIBWEBP)
|
||||
add_subdirectory(libwebp-cmake)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_GIFLIB)
|
||||
add_subdirectory(giflib)
|
||||
endif()
|
||||
|
1
third_party/libwebp
vendored
Submodule
1
third_party/libwebp
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 03fb75221c36ff773379eb5f018d7206f1ef30c9
|
45
third_party/libwebp-cmake/CMakeLists.txt
vendored
Normal file
45
third_party/libwebp-cmake/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
project (webp C)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
add_definitions(-DNDEBUG -DWEBP_USE_THREAD)
|
||||
|
||||
set(LIBWEBP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libwebp")
|
||||
|
||||
file(GLOB WEBP_DEC_SRCS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/dec/*c
|
||||
)
|
||||
|
||||
file(GLOB WEBP_DEMUX_SRCS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/demux/*c
|
||||
)
|
||||
|
||||
file(GLOB WEBP_DSP_SRCS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/dsp/*c
|
||||
)
|
||||
|
||||
file(GLOB WEBP_ENC_SRCS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/enc/*c
|
||||
)
|
||||
|
||||
file(GLOB WEBP_UTILS_SRCS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/utils/*c
|
||||
)
|
||||
|
||||
file(GLOB WEBP_MUX_SRCS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/mux/*c
|
||||
)
|
||||
|
||||
file(GLOB WEBP_HEADERS
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBWEBP_SOURCE_DIR}/src/webp/*.h
|
||||
)
|
||||
|
||||
SET(CMAKE_DEBUG_POSTFIX "d")
|
||||
set(WEBP_SOURCE ${WEBP_DEC_SRCS} ${WEBP_DEMUX_SRCS} ${WEBP_DSP_SRCS} ${WEBP_ENC_SRCS} ${WEBP_UTILS_SRCS} ${WEBP_MUX_SRC})
|
||||
add_library(${PROJECT_NAME} STATIC ${WEBP_SOURCE} ${WEBP_HEADERS})
|
Loading…
Reference in New Issue
Block a user