|
|
|
@@ -1,16 +1,16 @@
|
|
|
|
|
cmake_minimum_required(VERSION 2.8.7)
|
|
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
|
|
project(libwebp C)
|
|
|
|
|
project(WebP C)
|
|
|
|
|
|
|
|
|
|
# Options for coder / decoder executables.
|
|
|
|
|
option(WEBP_ENABLE_SIMD "Enable any SIMD optimization." ON)
|
|
|
|
|
option(WEBP_BUILD_CWEBP "Build the cwebp command line tool." OFF)
|
|
|
|
|
option(WEBP_BUILD_DWEBP "Build the dwebp command line tool." OFF)
|
|
|
|
|
option(WEBP_BUILD_GIF2WEBP "Build the gif2webp conversion tool." OFF)
|
|
|
|
|
option(WEBP_BUILD_IMG2WEBP "Build the img2webp animation tool." OFF)
|
|
|
|
|
option(WEBP_BUILD_WEBPINFO "Build the webpinfo command line tool." OFF)
|
|
|
|
|
option(WEBP_BUILD_CWEBP "Build the cwebp command line tool." ON)
|
|
|
|
|
option(WEBP_BUILD_DWEBP "Build the dwebp command line tool." ON)
|
|
|
|
|
option(WEBP_BUILD_GIF2WEBP "Build the gif2webp conversion tool." ON)
|
|
|
|
|
option(WEBP_BUILD_IMG2WEBP "Build the img2webp animation tool." ON)
|
|
|
|
|
option(WEBP_BUILD_WEBPINFO "Build the webpinfo command line tool." ON)
|
|
|
|
|
option(WEBP_BUILD_WEBP_JS "Emscripten build of webp.js." OFF)
|
|
|
|
|
option(WEBP_ENABLE_NEAR_LOSSLESS "Enable near-lossless encoding" ON)
|
|
|
|
|
option(WEBP_NEAR_LOSSLESS "Enable near-lossless encoding" ON)
|
|
|
|
|
option(WEBP_ENABLE_SWAP_16BIT_CSP "Enable byte swap for 16 bit colorspaces." OFF)
|
|
|
|
|
|
|
|
|
|
if(WEBP_BUILD_WEBP_JS)
|
|
|
|
@@ -22,12 +22,13 @@ set(WEBP_DEP_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
|
set(CMAKE_BUILD_TYPE "Release" CACHE
|
|
|
|
|
"Build type: Release, Debug or RelWithDebInfo" STRING FORCE
|
|
|
|
|
"Build type: Release, Debug, MinSizeRel or RelWithDebInfo" STRING FORCE
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Include dependencies.
|
|
|
|
|
include(cmake/deps.cmake)
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# Options.
|
|
|
|
@@ -100,6 +101,11 @@ foreach(FILE ${WEBP_SIMD_FILES_NOT_TO_INCLUDE})
|
|
|
|
|
list(REMOVE_ITEM WEBP_DSP_DEC_SRCS ${FILE})
|
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
# Generate the config.h file.
|
|
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.in
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/src/webp/config.h)
|
|
|
|
|
add_definitions(-DHAVE_CONFIG_H)
|
|
|
|
|
|
|
|
|
|
### Define the mandatory libraries.
|
|
|
|
|
# Build the webpdecoder library.
|
|
|
|
|
if(MSVC)
|
|
|
|
@@ -108,24 +114,63 @@ if(MSVC)
|
|
|
|
|
else()
|
|
|
|
|
add_definitions(-Wall)
|
|
|
|
|
endif()
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${WEBP_DEP_INCLUDE_DIRS})
|
|
|
|
|
include_directories(${WEBP_DEP_INCLUDE_DIRS})
|
|
|
|
|
add_library(webpdecode OBJECT ${WEBP_DEC_SRCS})
|
|
|
|
|
target_include_directories(webpdecode PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
add_library(webpdspdecode OBJECT ${WEBP_DSP_COMMON_SRCS} ${WEBP_DSP_DEC_SRCS})
|
|
|
|
|
target_include_directories(webpdspdecode PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
add_library(webputilsdecode OBJECT ${WEBP_UTILS_COMMON_SRCS}
|
|
|
|
|
${WEBP_UTILS_DEC_SRCS})
|
|
|
|
|
${WEBP_UTILS_DEC_SRCS}
|
|
|
|
|
)
|
|
|
|
|
target_include_directories(webputilsdecode PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
add_library(webpdecoder $<TARGET_OBJECTS:webpdecode>
|
|
|
|
|
$<TARGET_OBJECTS:webpdspdecode> $<TARGET_OBJECTS:webputilsdecode>)
|
|
|
|
|
target_link_libraries(webpdecoder ${WEBP_DEP_LIBRARIES})
|
|
|
|
|
target_include_directories(webpdecoder
|
|
|
|
|
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
|
|
|
)
|
|
|
|
|
set_target_properties(webpdecoder PROPERTIES PUBLIC_HEADER
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Build the webp library.
|
|
|
|
|
add_library(webpencode OBJECT ${WEBP_ENC_SRCS})
|
|
|
|
|
target_include_directories(webpencode PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
add_library(webpdsp OBJECT ${WEBP_DSP_COMMON_SRCS} ${WEBP_DSP_DEC_SRCS}
|
|
|
|
|
${WEBP_DSP_ENC_SRCS})
|
|
|
|
|
target_include_directories(webpdsp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
add_library(webputils OBJECT ${WEBP_UTILS_COMMON_SRCS} ${WEBP_UTILS_DEC_SRCS}
|
|
|
|
|
${WEBP_UTILS_ENC_SRCS})
|
|
|
|
|
target_include_directories(webputils PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
add_library(webp $<TARGET_OBJECTS:webpdecode> $<TARGET_OBJECTS:webpdsp>
|
|
|
|
|
$<TARGET_OBJECTS:webpencode> $<TARGET_OBJECTS:webputils>)
|
|
|
|
|
target_link_libraries(webp ${WEBP_DEP_LIBRARIES})
|
|
|
|
|
target_include_directories(webp
|
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
PUBLIC $<INSTALL_INTERFACE:include>
|
|
|
|
|
)
|
|
|
|
|
set_target_properties(webp PROPERTIES PUBLIC_HEADER
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/encode.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Make sure the OBJECT libraries are built with position independent code
|
|
|
|
|
# (it is not ON by default).
|
|
|
|
@@ -135,6 +180,17 @@ set_target_properties(webpdecode webpdspdecode webputilsdecode
|
|
|
|
|
# Build the webp demux library.
|
|
|
|
|
add_library(webpdemux ${WEBP_DEMUX_SRCS})
|
|
|
|
|
target_link_libraries(webpdemux webp)
|
|
|
|
|
target_include_directories(webpdemux
|
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
|
PUBLIC $<INSTALL_INTERFACE:include>
|
|
|
|
|
)
|
|
|
|
|
set_target_properties(webpdemux PROPERTIES PUBLIC_HEADER
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/demux.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Set the version numbers.
|
|
|
|
|
function(parse_version FILE NAME VAR)
|
|
|
|
@@ -182,6 +238,8 @@ if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP OR
|
|
|
|
|
list(APPEND EXAMPLEUTIL_SRCS
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h)
|
|
|
|
|
add_library(exampleutil ${EXAMPLEUTIL_SRCS})
|
|
|
|
|
target_include_directories(exampleutil
|
|
|
|
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
|
|
|
|
|
|
|
|
|
|
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEIOUTILS_SRCS"
|
|
|
|
|
"imageio_util_[^ ]*")
|
|
|
|
@@ -208,26 +266,22 @@ endif()
|
|
|
|
|
|
|
|
|
|
if(WEBP_BUILD_DWEBP)
|
|
|
|
|
# dwebp
|
|
|
|
|
include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS})
|
|
|
|
|
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "DWEBP_SRCS"
|
|
|
|
|
"dwebp")
|
|
|
|
|
add_executable(dwebp ${DWEBP_SRCS})
|
|
|
|
|
target_link_libraries(dwebp exampleutil imagedec imageenc webpdecoder)
|
|
|
|
|
install(TARGETS dwebp RUNTIME DESTINATION bin)
|
|
|
|
|
set_property(TARGET dwebp PROPERTY INCLUDE_DIRECTORIES
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
target_link_libraries(dwebp exampleutil imagedec imageenc)
|
|
|
|
|
target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
install(TARGETS dwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WEBP_BUILD_CWEBP)
|
|
|
|
|
# cwebp
|
|
|
|
|
include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS})
|
|
|
|
|
parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "CWEBP_SRCS"
|
|
|
|
|
"cwebp")
|
|
|
|
|
add_executable(cwebp ${CWEBP_SRCS})
|
|
|
|
|
target_link_libraries(cwebp exampleutil imagedec webp)
|
|
|
|
|
install(TARGETS cwebp RUNTIME DESTINATION bin)
|
|
|
|
|
set_property(TARGET cwebp PROPERTY INCLUDE_DIRECTORIES
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND)
|
|
|
|
@@ -239,9 +293,16 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP)
|
|
|
|
|
"")
|
|
|
|
|
add_library(webpmux ${WEBP_MUX_SRCS})
|
|
|
|
|
target_link_libraries(webpmux webp)
|
|
|
|
|
target_include_directories(webpmux
|
|
|
|
|
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
parse_version(mux/Makefile.am webpmux WEBP_MUX_SOVERSION)
|
|
|
|
|
set_target_properties(webpmux PROPERTIES VERSION ${PACKAGE_VERSION}
|
|
|
|
|
SOVERSION ${WEBP_MUX_SOVERSION})
|
|
|
|
|
set_target_properties(webpmux PROPERTIES PUBLIC_HEADER
|
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;"
|
|
|
|
|
)
|
|
|
|
|
list(APPEND INSTALLED_LIBRARIES webpmux)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
@@ -253,9 +314,8 @@ if(WEBP_BUILD_GIF2WEBP)
|
|
|
|
|
add_executable(gif2webp ${GIF2WEBP_SRCS})
|
|
|
|
|
target_link_libraries(gif2webp exampleutil imageioutil webp webpmux
|
|
|
|
|
${WEBP_DEP_GIF_LIBRARIES})
|
|
|
|
|
install(TARGETS gif2webp RUNTIME DESTINATION bin)
|
|
|
|
|
set_property(TARGET gif2webp PROPERTY INCLUDE_DIRECTORIES
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
install(TARGETS gif2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WEBP_BUILD_IMG2WEBP)
|
|
|
|
@@ -265,9 +325,8 @@ if(WEBP_BUILD_IMG2WEBP)
|
|
|
|
|
"img2webp")
|
|
|
|
|
add_executable(img2webp ${IMG2WEBP_SRCS})
|
|
|
|
|
target_link_libraries(img2webp exampleutil imagedec imageioutil webp webpmux)
|
|
|
|
|
install(TARGETS img2webp RUNTIME DESTINATION bin)
|
|
|
|
|
set_property(TARGET img2webp PROPERTY INCLUDE_DIRECTORIES
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
install(TARGETS img2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (WEBP_BUILD_WEBPINFO)
|
|
|
|
@@ -277,53 +336,51 @@ if (WEBP_BUILD_WEBPINFO)
|
|
|
|
|
"webpinfo")
|
|
|
|
|
add_executable(webpinfo ${WEBPINFO_SRCS})
|
|
|
|
|
target_link_libraries(webpinfo exampleutil imageioutil)
|
|
|
|
|
install(TARGETS webpinfo RUNTIME DESTINATION bin)
|
|
|
|
|
set_property(TARGET webpinfo PROPERTY INCLUDE_DIRECTORIES
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
|
|
|
|
install(TARGETS webpinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WEBP_BUILD_WEBP_JS)
|
|
|
|
|
# JavaScript version
|
|
|
|
|
add_executable(webp_js
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
|
|
|
|
|
add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
|
|
|
|
|
target_link_libraries(webp_js webpdecoder SDL)
|
|
|
|
|
target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
set(WEBP_HAVE_SDL 1)
|
|
|
|
|
set_target_properties(webp_js PROPERTIES LINK_FLAGS
|
|
|
|
|
"-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0")
|
|
|
|
|
"-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
|
|
|
|
|
-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
|
|
|
|
|
set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp)
|
|
|
|
|
target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
|
|
|
|
|
|
|
|
|
|
# WASM version
|
|
|
|
|
add_executable(webp_wasm
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
|
|
|
|
|
add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
|
|
|
|
|
target_link_libraries(webp_wasm webpdecoder SDL)
|
|
|
|
|
target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
set_target_properties(webp_wasm PROPERTIES LINK_FLAGS
|
|
|
|
|
"-s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"' \
|
|
|
|
|
-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0")
|
|
|
|
|
-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
|
|
|
|
|
-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
|
|
|
|
|
target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
|
|
|
|
|
|
|
|
|
|
target_compile_definitions(webpdecoder PUBLIC EMSCRIPTEN)
|
|
|
|
|
target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Generate the config.h file.
|
|
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.in
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/src/webp/config.h)
|
|
|
|
|
add_definitions(-DHAVE_CONFIG_H)
|
|
|
|
|
# The webp folder is included as we reference config.h as
|
|
|
|
|
# ../webp/config.h or webp/config.h
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
|
|
# Install the different headers and libraries.
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/demux.h
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/encode.h
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h
|
|
|
|
|
DESTINATION include/webp)
|
|
|
|
|
install(TARGETS ${INSTALLED_LIBRARIES}
|
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
install(
|
|
|
|
|
TARGETS ${INSTALLED_LIBRARIES}
|
|
|
|
|
EXPORT ${PROJECT_NAME}Targets
|
|
|
|
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webp
|
|
|
|
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
|
)
|
|
|
|
|
set(ConfigPackageLocation ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)
|
|
|
|
|
install(EXPORT ${PROJECT_NAME}Targets
|
|
|
|
|
NAMESPACE ${PROJECT_NAME}::
|
|
|
|
|
DESTINATION ${ConfigPackageLocation}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Create the CMake version file.
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
@@ -335,7 +392,6 @@ write_basic_package_version_file(
|
|
|
|
|
|
|
|
|
|
# Create the Config file.
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
|
set(ConfigPackageLocation share/WebP/cmake/)
|
|
|
|
|
configure_package_config_file(
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/WebPConfig.cmake.in
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/WebPConfig.cmake
|
|
|
|
@@ -362,7 +418,7 @@ foreach(I_MAN RANGE ${MAN_PAGES_RANGE})
|
|
|
|
|
if(WEBP_BUILD_${EXEC_BUILD})
|
|
|
|
|
list(GET MAN_PAGES ${I_MAN} MAN_PAGE)
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man/${MAN_PAGE}
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
|
|
|
|
|
COMPONENT doc
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|