Skip to content

Build: Missing bundled dependencies #5044

@OgreTransporter

Description

@OgreTransporter

PR #4996 is incomplete! It is missing that PNG depends on ZLIB.

#include "zlib.h"


Fix for dependencies/png/CMakeLists.txt: Insert the following after line

add_library(PNG::PNG ALIAS _BUNDLED_PNG)

target_link_libraries(_BUNDLED_PNG PUBLIC "$<BUILD_LOCAL_INTERFACE:ZLIB::ZLIB>")

This means that HPDF must also depend on ZLIB, otherwise it will not work with object or static libraries.

Fix for dependencies/hpdf/CMakeLists.txt: Replace line

target_link_libraries(_BUNDLED_HPDF PRIVATE "$<BUILD_LOCAL_INTERFACE:PNG::PNG>")

by

	target_link_libraries(_BUNDLED_HPDF PUBLIC "$<BUILD_LOCAL_INTERFACE:PNG::PNG>" "$<BUILD_LOCAL_INTERFACE:ZLIB::ZLIB>")

Fix for PDF/CMakeLists.txt: Replace line

target_link_libraries(PDF PRIVATE "$<BUILD_LOCAL_INTERFACE:PNG::PNG>")

by

target_link_libraries(PDF PRIVATE "$<BUILD_LOCAL_INTERFACE:PNG::PNG>" "$<BUILD_LOCAL_INTERFACE:ZLIB::ZLIB>")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions