2016-10-24 04:26:15 +08:00
include ( vcpkg_common_functions )
2017-03-24 21:39:50 +08:00
2018-03-03 04:28:34 +08:00
vcpkg_from_github (
2019-02-27 00:16:20 +08:00
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O w e b m p r o j e c t / l i b w e b p
R E F v 1 . 0 . 2
S H A 5 1 2 2 7 c a 4 e 7 c 8 7 d 3 1 1 4 a 5 d 3 d b a 6 8 0 1 b 5 6 0 8 2 0 7 a 9 a d c 4 4 d 0 f a 6 2 f 7 5 2 3 d 3 9 b e 7 8 9 d 3 8 9 d 3 4 2 d 9 d b 5 e 2 8 c 9 3 0 1 e f f 8 f c b 1 4 7 1 8 0 9 c 7 6 6 8 0 a 6 8 a b d 4 f f 9 7 2 1 7 b 1 7 d d 1 3 c 4 e 2 2 b
H E A D _ R E F m a s t e r
P A T C H E S
0 0 0 1 - b u i l d - f i x e s . p a t c h
0 0 0 2 - c m a k e - c o n f i g - a d d - b a c k w a r d s - c o m p a t i b i l i t y . p a t c h
2019-05-10 02:45:23 +08:00
0 0 0 3 - r e m o v e - m i s s i n g - s y m b o l . p a t c h
0 0 0 4 - a d d - m i s s i n g - l i n k e d - l i b r a r y . p a t c h
2019-05-29 06:33:38 +08:00
0 0 0 5 - f i x - s t a t i c - b u i l d . p a t c h
2016-10-24 04:26:15 +08:00
)
2019-02-27 00:16:20 +08:00
set ( WEBP_BUILD_ANIM_UTILS OFF )
set ( WEBP_BUILD_GIF2WEBP OFF )
set ( WEBP_BUILD_IMG2WEBP OFF )
set ( WEBP_BUILD_VWEBP OFF )
set ( WEBP_BUILD_WEBPINFO OFF )
set ( WEBP_BUILD_WEBPMUX OFF )
set ( WEBP_BUILD_EXTRAS OFF )
set ( WEBP_NEAR_LOSSLESS OFF )
if ( "all" IN_LIST FEATURES )
set ( WEBP_BUILD_ANIM_UTILS ON )
set ( WEBP_NEAR_LOSSLESS ON )
set ( WEBP_BUILD_GIF2WEBP ON )
set ( WEBP_BUILD_IMG2WEBP ON )
set ( WEBP_BUILD_VWEBP ON )
set ( WEBP_BUILD_WEBPINFO ON )
set ( WEBP_BUILD_WEBPMUX ON )
set ( WEBP_BUILD_EXTRAS ON )
endif ( )
2018-02-01 23:06:54 +08:00
2019-05-10 02:45:23 +08:00
if ( VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" )
message ( "WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev" )
endif ( )
2016-10-24 04:26:15 +08:00
vcpkg_configure_cmake (
2019-02-27 00:16:20 +08:00
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
P R E F E R _ N I N J A
O P T I O N S
- D W E B P _ E N A B L E _ S I M D : B O O L = O N
- D W E B P _ B U I L D _ A N I M _ U T I L S : B O O L = $ { W E B P _ B U I L D _ A N I M _ U T I L S }
- D W E B P _ B U I L D _ C W E B P : B O O L = O F F
- D W E B P _ B U I L D _ D W E B P : B O O L = O F F
- D W E B P _ B U I L D _ G I F 2 W E B P : B O O L = $ { W E B P _ B U I L D _ G I F 2 W E B P }
- D W E B P _ B U I L D _ I M G 2 W E B P : B O O L = $ { W E B P _ B U I L D _ I M G 2 W E B P }
- D W E B P _ B U I L D _ V W E B P : B O O L = $ { W E B P _ B U I L D _ V W E B P }
- D W E B P _ B U I L D _ W E B P I N F O : B O O L = $ { W E B P _ B U I L D _ W E B P I N F O }
- D W E B P _ B U I L D _ W E B P M U X : B O O L = $ { W E B P _ B U I L D _ W E B P M U X }
- D W E B P _ B U I L D _ E X T R A S : B O O L = $ { W E B P _ B U I L D _ E X T R A S }
- D W E B P _ B U I L D _ W E B P _ J S : B O O L = O F F
- D W E B P _ N E A R _ L O S S L E S S : B O O L = $ { W E B P _ N E A R _ L O S S L E S S }
- D W E B P _ E N A B L E _ S W A P _ 1 6 B I T _ C S P : B O O L = O F F
O P T I O N S _ D E B U G
- D C M A K E _ D E B U G _ P O S T F I X = d
2016-10-24 04:26:15 +08:00
)
vcpkg_install_cmake ( )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2019-02-27 00:16:20 +08:00
vcpkg_copy_pdbs ( )
vcpkg_fixup_cmake_targets ( CONFIG_PATH "share/WebP/cmake/" TARGET_PATH "share/WebP/" )
2018-01-19 13:06:04 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
2016-10-24 04:26:15 +08:00
2019-05-10 02:45:23 +08:00
#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it
if ( CMAKE_HOST_WIN32 )
set ( EXECUTABLE_SUFFIX ".exe" )
else ( )
set ( EXECUTABLE_SUFFIX "" )
endif ( )
2019-02-27 00:16:20 +08:00
if ( "all" IN_LIST FEATURES )
2019-05-10 02:45:23 +08:00
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/get_disto ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/gif2webp ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/img2webp ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/vwebp ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/vwebp_sdl ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/webpinfo ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/webpmux ${ EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/webp_quality ${ EXECUTABLE_SUFFIX } )
2019-02-27 00:16:20 +08:00
file ( MAKE_DIRECTORY ${ CURRENT_PACKAGES_DIR } /tools/libwebp/ )
2019-05-10 02:45:23 +08:00
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/get_disto ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/get_disto ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/gif2webp ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/gif2webp ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/img2webp ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/img2webp ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/vwebp ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/vwebp ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/vwebp_sdl ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/vwebp_sdl ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/webpinfo ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/webpinfo ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/webpmux ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/webpmux ${ EXECUTABLE_SUFFIX } )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX}" )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/webp_quality ${ EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/libwebp/webp_quality ${ EXECUTABLE_SUFFIX } )
endif ( )
2019-02-27 00:16:20 +08:00
vcpkg_copy_tool_dependencies ( ${ CURRENT_PACKAGES_DIR } /tools/libwebp )
endif ( )
2019-05-10 02:45:23 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /bin ${ CURRENT_PACKAGES_DIR } /debug/bin )
endif ( )
2016-10-24 04:26:15 +08:00
file ( COPY ${ SOURCE_PATH } /COPYING DESTINATION ${ CURRENT_PACKAGES_DIR } /share/libwebp )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /share/libwebp/COPYING ${ CURRENT_PACKAGES_DIR } /share/libwebp/copyright )