mozilla / mozjpeg

Improved JPEG encoder.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Something misses in BUILDING.md

tasty0tomato opened this issue · comments

  1. I tried to build MozJPEG on Windows followed BUILDING.md.

  2. There were CMake, NASM, Visual Studio 2017 in my computer.

  3. I followed Visual C++ (Command Line) but there was error.

-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.19042.
-- CMAKE_BUILD_TYPE = Release
-- VERSION = 4.0.3, BUILD = 20210621
-- 64-bit build (x86_64)
-- CMAKE_INSTALL_PREFIX = c:/mozjpeg64
-- CMAKE_INSTALL_BINDIR = bin (c:/mozjpeg64/bin)
-- CMAKE_INSTALL_DATAROOTDIR =  (c:/mozjpeg64)
-- CMAKE_INSTALL_DOCDIR = doc (c:/mozjpeg64/doc)
-- CMAKE_INSTALL_INCLUDEDIR = include (c:/mozjpeg64/include)
-- CMAKE_INSTALL_LIBDIR = lib (c:/mozjpeg64/lib)
-- Shared libraries enabled (ENABLE_SHARED = 1)
-- Static libraries enabled (ENABLE_STATIC = 1)
-- 12-bit JPEG support disabled (WITH_12BIT = 0)
-- Arithmetic decoding support disabled (WITH_ARITH_DEC = 0)
-- Arithmetic encoding support disabled (WITH_ARITH_ENC = 0)
-- TurboJPEG API library enabled (WITH_TURBOJPEG = 1)
-- TurboJPEG Java wrapper disabled (WITH_JAVA = 0)
-- In-memory source/destination managers enabled (WITH_MEM_SRCDST = 1)
-- Emulating libjpeg API/ABI v6.2 (WITH_JPEG7 = 0, WITH_JPEG8 = 0)
-- libjpeg API shared library version = 62.3.0
-- Compiler flags = /DWIN32 /D_WINDOWS /W3 /W3 /wd4996 /MT /O2 /Ob2 /DNDEBUG
-- Linker flags = /machine:x64 /INCREMENTAL:NO
-- INLINE = __forceinline (FORCE_INLINE = 1)
-- THREAD_LOCAL = __declspec(thread)
-- CMAKE_EXECUTABLE_SUFFIX = .exe
-- CMAKE_ASM_NASM_COMPILER = C:/Program Files/NASM/nasm.exe
-- CMAKE_ASM_NASM_OBJECT_FORMAT = win64
-- CMAKE_ASM_NASM_FLAGS =  -DWIN64 -D__x86_64__
-- SIMD extensions: x86_64 (WITH_SIMD = 1)
-- PNG reading support enabled (PNG_SUPPORTED = 1)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) (Required is
  at least version "1.6")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.20/Modules/FindPNG.cmake:159 (find_package_handle_standard_args)
  sharedlib/CMakeLists.txt:97 (find_package)


-- Configuring incomplete, errors occurred!

3. I wanted to find out if it was the problem from libjpeg-turbo, but I could build it successfully with the same environment.

So I think maybe there should be something changed in MozJPEG's BUILDING.md.

CMake is painful like that. Add -DPNG_SUPPORTED=NO to cmake flags.

I understand that libpng misses.
And I read appveyor.yml and I found that maybe I need vcpkg to build libpng.
I will try later and if I can build libpng and build MozJPEG with it, I will make some changes to BUILDING.md. If not, I will just close this issue.