mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 14:11:49 +08:00
[mozjpeg] Update to latest commit (#11719)
This commit is contained in:
parent
f3c92f82d6
commit
2ba3794909
@ -1,4 +1,4 @@
|
|||||||
Source: mozjpeg
|
Source: mozjpeg
|
||||||
Version: 3.2-3
|
Version: 2020-06-02
|
||||||
Homepage: https://github.com/mozilla/mozjpeg
|
Homepage: https://github.com/mozilla/mozjpeg
|
||||||
Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg.
|
Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index ac0ebdb..483bf0f 100644
|
index 51f4714..9ca3463 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -875,43 +875,51 @@ add_custom_target(installer
|
@@ -1370,21 +1370,28 @@ endif()
|
||||||
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
|
|
||||||
SOURCES mozjpeg.nsi)
|
set(EXE ${CMAKE_EXECUTABLE_SUFFIX})
|
||||||
|
|
||||||
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
+ set(REAL_BUILDS_PATH "Debug/")
|
+ set(REAL_BUILDS_PATH "Debug/")
|
||||||
@ -15,73 +15,112 @@ index ac0ebdb..483bf0f 100644
|
|||||||
if(WITH_TURBOJPEG)
|
if(WITH_TURBOJPEG)
|
||||||
if(ENABLE_SHARED)
|
if(ENABLE_SHARED)
|
||||||
install(TARGETS turbojpeg tjbench
|
install(TARGETS turbojpeg tjbench
|
||||||
- ARCHIVE DESTINATION lib
|
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
- LIBRARY DESTINATION lib
|
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
- RUNTIME DESTINATION bin)
|
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
+ ARCHIVE DESTINATION lib/mozjpeg
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg
|
||||||
+ LIBRARY DESTINATION lib/mozjpeg
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg
|
||||||
+ RUNTIME DESTINATION tools/mozjpeg)
|
+ RUNTIME DESTINATION tools/mozjpeg)
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
|
||||||
|
CMAKE_C_LINKER_SUPPORTS_PDB)
|
||||||
|
install(FILES "$<TARGET_PDB_FILE:turbojpeg>"
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}/mozjpeg OPTIONAL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(ENABLE_STATIC)
|
if(ENABLE_STATIC)
|
||||||
- install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib)
|
- install(TARGETS turbojpeg-static ARCHIVE
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
+ install(TARGETS turbojpeg-static
|
+ install(TARGETS turbojpeg-static
|
||||||
+ LIBRARY DESTINATION lib/mozjpeg
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg
|
||||||
+ ARCHIVE DESTINATION lib/mozjpeg)
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg)
|
||||||
if(NOT ENABLE_SHARED)
|
if(NOT ENABLE_SHARED)
|
||||||
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe
|
if(MSVC_IDE OR XCODE)
|
||||||
- DESTINATION bin RENAME tjbench.exe)
|
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
||||||
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/tjbench-static.exe
|
@@ -1392,15 +1399,15 @@ if(WITH_TURBOJPEG)
|
||||||
+ DESTINATION tools/mozjpeg RENAME tjbench.exe)
|
set(DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
install(PROGRAMS ${DIR}/tjbench-static${EXE}
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE})
|
||||||
|
+ DESTINATION tools/mozjpeg RENAME tjbench${EXE})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
- install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h
|
||||||
+ install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include/mozjpeg)
|
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mozjpeg)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_STATIC)
|
if(ENABLE_STATIC)
|
||||||
- install(TARGETS jpeg-static ARCHIVE DESTINATION lib)
|
- install(TARGETS jpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
+ install(TARGETS jpeg-static ARCHIVE DESTINATION lib/mozjpeg)
|
+ install(TARGETS jpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg)
|
||||||
if(NOT ENABLE_SHARED)
|
if(NOT ENABLE_SHARED)
|
||||||
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe
|
if(MSVC_IDE OR XCODE)
|
||||||
- DESTINATION bin RENAME cjpeg.exe)
|
set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}")
|
||||||
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe
|
@@ -1408,15 +1415,15 @@ if(ENABLE_STATIC)
|
||||||
- DESTINATION bin RENAME djpeg.exe)
|
set(DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jpegtran-static.exe
|
endif()
|
||||||
- DESTINATION bin RENAME jpegtran.exe)
|
install(PROGRAMS ${DIR}/cjpeg-static${EXE}
|
||||||
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/cjpeg-static.exe
|
- DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME cjpeg${EXE})
|
||||||
+ DESTINATION tools/mozjpeg RENAME cjpeg.exe)
|
+ DESTINATION tools/mozjpeg RENAME cjpeg${EXE})
|
||||||
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/djpeg-static.exe
|
install(PROGRAMS ${DIR}/djpeg-static${EXE}
|
||||||
+ DESTINATION tools/mozjpeg RENAME djpeg.exe)
|
- DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME djpeg${EXE})
|
||||||
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${REAL_BUILDS_PATH}mozjpeg/jpegtran-static.exe
|
+ DESTINATION tools/mozjpeg RENAME djpeg${EXE})
|
||||||
+ DESTINATION tools/mozjpeg RENAME jpegtran.exe)
|
install(PROGRAMS ${DIR}/jpegtran-static${EXE}
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME jpegtran${EXE})
|
||||||
|
+ DESTINATION tools/mozjpeg RENAME jpegtran${EXE})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin)
|
-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
+install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION tools/mozjpeg)
|
+install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION tools/mozjpeg)
|
||||||
|
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/README.ijg ${CMAKE_SOURCE_DIR}/README-mozilla.txt
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
|
||||||
${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
|
||||||
${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
|
@@ -1424,10 +1431,10 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
|
||||||
${CMAKE_SOURCE_DIR}/wizard.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt
|
||||||
- DESTINATION doc)
|
${CMAKE_CURRENT_SOURCE_DIR}/structure.txt
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt
|
||||||
|
- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
+ ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION share/mozjpeg)
|
||||||
|
if(WITH_JAVA)
|
||||||
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
+ DESTINATION share/mozjpeg)
|
+ DESTINATION share/mozjpeg)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(UNIX OR MINGW)
|
||||||
|
@@ -1439,12 +1446,12 @@ if(UNIX OR MINGW)
|
||||||
|
endif()
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/mozjpeg)
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mozjpeg)
|
||||||
|
|
||||||
|
include(cmakescripts/BuildPackages.cmake)
|
||||||
|
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
|
|
||||||
${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
|
|
||||||
- DESTINATION include)
|
|
||||||
+ DESTINATION include/mozjpeg)
|
|
||||||
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
|
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
|
||||||
index 268cc14..d067d2a 100644
|
index f0a7d87..1e82349 100644
|
||||||
--- a/sharedlib/CMakeLists.txt
|
--- a/sharedlib/CMakeLists.txt
|
||||||
+++ b/sharedlib/CMakeLists.txt
|
+++ b/sharedlib/CMakeLists.txt
|
||||||
@@ -68,6 +68,6 @@ add_executable(jcstest ../jcstest.c)
|
@@ -92,11 +92,11 @@ add_executable(jcstest ../jcstest.c)
|
||||||
target_link_libraries(jcstest jpeg)
|
target_link_libraries(jcstest jpeg)
|
||||||
|
|
||||||
install(TARGETS jpeg cjpeg djpeg jpegtran
|
install(TARGETS jpeg cjpeg djpeg jpegtran
|
||||||
- ARCHIVE DESTINATION lib
|
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
- LIBRARY DESTINATION lib
|
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
- RUNTIME DESTINATION bin)
|
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
+ ARCHIVE DESTINATION lib/mozjpeg
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg
|
||||||
+ LIBRARY DESTINATION lib/mozjpeg
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mozjpeg
|
||||||
+ RUNTIME DESTINATION tools/mozjpeg)
|
+ RUNTIME DESTINATION tools/mozjpeg)
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
|
||||||
|
CMAKE_C_LINKER_SUPPORTS_PDB)
|
||||||
|
install(FILES "$<TARGET_PDB_FILE:jpeg>"
|
||||||
|
- DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_BINDIR}/mozjpeg OPTIONAL)
|
||||||
|
endif()
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
include(vcpkg_common_functions)
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO mozilla/mozjpeg
|
REPO mozilla/mozjpeg
|
||||||
REF v3.2
|
REF 6d95c51adf0c314017f541b6cb07e13cc1bce754
|
||||||
SHA512 d14789827a9f4f78139a3945d3169d37eb891758b5ab40ef19e99ebebb2fb6d7c3a05495de245bba54cfd913b153af352159aa9fc0218127f97819137e0f1ab8
|
SHA512 a21c8b3a561b387933a27befaa1d05a8c63b0e203d72d73071a4c9b57c6b7d57b44836f211c4dcb80eee4b01876f0a0fb4c91a60c3ae867e906e5e4e27165627
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
PATCHES
|
||||||
fix-install-error.patch
|
fix-install-error.patch
|
||||||
@ -12,7 +10,7 @@ vcpkg_from_github(
|
|||||||
|
|
||||||
vcpkg_find_acquire_program(NASM)
|
vcpkg_find_acquire_program(NASM)
|
||||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
||||||
set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}")
|
vcpkg_add_to_path(${NASM_EXE_PATH})
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||||
set(ENABLE_STATIC_BUILD ON)
|
set(ENABLE_STATIC_BUILD ON)
|
||||||
@ -39,7 +37,7 @@ vcpkg_install_cmake()
|
|||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
|
|
||||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mozjpeg)
|
vcpkg_copy_tools(${CURRENT_PACKAGES_DIR}/tools/mozjpeg)
|
||||||
|
|
||||||
#remove empty folders after static build
|
#remove empty folders after static build
|
||||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||||
@ -48,5 +46,5 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mozjpeg RENAME copyright)
|
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
Loading…
Reference in New Issue
Block a user