[Suggestion] RPM/DEB: assimp external dependency

Many distros (including Fedora 31) provide assimp as a package. If doomsday is built with embedded assimp, resulting RPM would conflict with system assimp package, so I build RPM for Fedora 31 using system provided assimp. That means that package should explicitly require assimp when installed. I modified doomsday/cmake/Packaging.cmake, added the following block after line 20:

if (DENG_ASSIMP_EMBEDDED STREQUAL OFF)
string (APPEND CPACK_RPM_PACKAGE_REQUIRES ", assimp")
endif ()

This ensures that assimp package will by automatically installed by dnf when you try to install doomsday RPM.
CPACK_DEBIAN_PACKAGE_DEPENDS should be modified in similar way, I just don't have debian to check proper name for assimp.

Comments

  • edited 2020 Jan 1
    Sure, this makes sense.

    Although, there are a few details to note:
    • The Assimp that Doomsday uses has a couple of small changes, mostly to do with MD5 texture map names with regard to PBR materials. A system-provided Assimp library lacks this.
    • You should use:
      if (NOT DENG_ASSIMP_EMBEDDED)
      
      because "OFF" is not the only valid boolean false value in CMake.

    I can incorporate these changes, though.
  • Thanks, I'm new to cmake. Can those changes in assimp be suggested for upstream? System provided asssimp may be used by other applications, so it would be impossible to install doomsday without removing them.
  • edited 2020 Jan 1
    Can those changes in assimp be suggested for upstream?
    Not without additional work: a) The changes were done against Assimp 3, and would have to be ported to the current Assimp 5; b) The PBR material setup is specific to Doomsday, and pushing this upstream would necessitate generalizing it to suit other use cases; c) Doomsday 3 uses unmodified Assimp anyway.
Sign In or Register to comment.