Skip to content

Using vendored openjph and BUILD_SHARED_LIBS=OFF is not properly supported #2439

Description

@mwestphal

Building openexr with :

cmake -DBUILD_SHARED_LIBS=OFF -DOPENEXR_FORCE_INTERNAL_OPENJPH=ON ../src

Results of the following in the install:

OpenEXRConfig.cmake (correct)

if ()
  find_dependency(openjph)
endif()

OpenEXRTargets.cmake (incorrect)

set_target_properties(OpenEXR::OpenEXRCore PROPERTIES
  INTERFACE_COMPILE_FEATURES "cxx_std_17"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "OpenEXR::OpenEXRConfig;Imath::Imath;dl;/usr/lib/libm.so;libdeflate::libdeflate_shared;\$<LINK_ONLY:openjph>"
)

Which results of the following when trying to use it:

CMake Error at vtkext/private/module/CMakeLists.txt:125 (find_package):
  Found package configuration file:

    /home/glow/dev/f3d/deps/openexr/install/lib/cmake/OpenEXR/OpenEXRConfig.cmake

  but it set OpenEXR_FOUND to FALSE so package "OpenEXR" is considered to be
  NOT FOUND.  Reason given by package:

  The following imported targets are referenced, but are missing: openjph

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions