mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 18:47:09 +01:00
[libwebp] Deploy FindWebP.cmake
This commit is contained in:
parent
832f908694
commit
5609d34b39
@ -1,3 +1,3 @@
|
||||
Source: libwebp
|
||||
Version: 0.6.1-1
|
||||
Version: 0.6.1-2
|
||||
Description: Lossy compression of digital photographic images.
|
||||
|
27
ports/libwebp/FindWebP.cmake
Normal file
27
ports/libwebp/FindWebP.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
include(SelectLibraryConfigurations)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# If the user has provided ``WEBP_ROOT``, use it! Choose items found
|
||||
# at this location over system locations.
|
||||
if( EXISTS "$ENV{WEBP_ROOT}" )
|
||||
file( TO_CMAKE_PATH "$ENV{WEBP_ROOT}" WEBP_ROOT )
|
||||
set( WEBP_ROOT "${WEBP_ROOT}" CACHE PATH "Prefix for WebP installation." )
|
||||
elseif(EXISTS "$ENV{WEBP_DIR}" )
|
||||
file( TO_CMAKE_PATH "$ENV{WEBP_DIR}" WEBP_ROOT )
|
||||
set( WEBP_ROOT "${WEBP_ROOT}" CACHE PATH "Prefix for WebP installation." )
|
||||
endif()
|
||||
|
||||
if(NOT WEBP_INCLUDE_DIR)
|
||||
FIND_PATH(WEBP_INCLUDE_DIR NAMES webp/decode.h)
|
||||
endif()
|
||||
|
||||
if(NOT WEBP_LIBRARY)
|
||||
find_library(WEBP_LIBRARY_RELEASE NAMES webp PATHS ${WEBP_ROOT} PATH_SUFFIXES webp )
|
||||
find_library(WEBP_LIBRARY_DEBUG NAMES webpd PATHS ${WEBP_ROOT} PATH_SUFFIXES debug webp webp/debug debug/webp)
|
||||
select_library_configurations(WEBP)
|
||||
endif()
|
||||
|
||||
SET(WEBP_LIBRARIES ${WEBP_LIBRARY})
|
||||
SET(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})
|
||||
|
||||
find_package_handle_standard_args(WEBP REQUIRED_VARS WEBP_LIBRARY WEBP_INCLUDE_DIR)
|
@ -36,3 +36,5 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwe
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebp/COPYING ${CURRENT_PACKAGES_DIR}/share/libwebp/copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindWebP.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user