[guetzli] init fixes #844

This commit is contained in:
atkawa7 2017-09-03 11:14:33 -07:00
parent eefd9c94d0
commit a7299d4570
4 changed files with 75 additions and 1 deletions

View File

@ -39,5 +39,5 @@ if(NOT DISABLE_INSTALL_TOOLS)
endif()
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES butteraugli/butteraugli.h DESTINATION include)
install(FILES butteraugli/butteraugli.h DESTINATION include/butteraugli)
endif()

View File

@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.8.0)
project(guetzli)
if(MSVC)
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
endif()
if(BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
find_path(butteraugli_include butteraugli/butteraugli.h)
find_library(butteraugli_library NAMES butteraugli_lib)
find_package(PNG REQUIRED)
include_directories("." ${PNG_INCLUDE_DIRS} ${butteraugli_include})
file(GLOB guetzli_srcs "guetzli/*.cc")
file(GLOB guetzli_includes "guetzli/*.h")
list(REMOVE_ITEM guetzli_srcs "guetzli/guetzli.cc")
add_library(guetzli_lib ${guetzli_srcs})
add_executable(guetzli guetzli/guetzli.cc)
target_link_libraries(guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES})
target_link_libraries(guetzli guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES})
install(
TARGETS guetzli_lib
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_TOOLS)
install (
TARGETS guetzli
RUNTIME DESTINATION tools/guetzli
)
endif()
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES ${guetzli_includes} DESTINATION include/guetzli)
endif()

4
ports/guetzli/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: guetzli
Version: 2017-09-02-cb5e4a86f69628
Description: Perceptual JPEG encoder
Build-Depends: libpng, butteraugli

View File

@ -0,0 +1,24 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/guetzli
REF cb5e4a86f69628f685f2b78d7429e248ab83d8d7
SHA512 695a87dc27573b8df74a7e7924e9b96a7bd375b1aae02e7b0fad800428d973cf17947d46ec7afefade2a86ebe3d39f3c3178aad1137b9dd013f5f85ee6569a75
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/guetzli)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/guetzli RENAME copyright)