configure step partially(?) ignores `USE_SYSTEM_ZLIB:BOOL=OFF`.
MiKTeX source code moved to GitHub
Brought to you by:
csc
On OS X, the system zlib is version 1.2.5, which does not have z_const. Part of the DviWare program uses z_const, so I disabled using the system-zlib in cmake to use the internal zlib-1.2.8. However, during the configure step, cmake still searches for and finds the system headers and libraries:
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") // Use the system zlib compression library. USE_SYSTEM_ZLIB:BOOL=OFF // Path to a file. ZLIB_INCLUDE_DIR:PATH=/usr/include // Path to a library. ZLIB_LIBRARY_RELEASE:FILEPATH=/usr/lib/libz.dylib
and then cmake configure fails:
CMake Error at Programs/DviWare/dvipdfm-x/CMakeLists.txt:296 (add_executable): Target "miktex-xdvipdfmx" links to target "MiKTeX::Imported::ZLIB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
If I don't disable system-zlib, configuring concludes correctly, and the build then fails later on with undeclared z_const.
For the completeness, here's the error if I try to use system-zlib-1.2.5: