Vcpkg: [assimp] assimp CMake package name is Assimp, not consitent with other platforms where it is assimp

Created on 27 Oct 2020  路  3Comments  路  Source: microsoft/vcpkg

Describe the bug
The assimp vcpkg port install a CMake config file called AssimpConfig.cmake, that is not consistent with the assimp-config.cmake installed by other package managers such as homebrew or apt.

Environment

  • OS: Windows
  • Compiler: Not Relevant

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install assimp
  2. In share/assimp you can find the AssimpConfig.cmake file, differently from apt and homebrew that install an assimp-config.cmake file (see for example https://packages.debian.org/sid/amd64/libassimp-dev/filelist)

Expected behavior
I would expect the vcpkg port to install a assimp-config.cmake file as well.

Failure logs
-(please attached failure logs)

Additional context
assimp CMake config files have been historically very problematic. PR https://github.com/microsoft/vcpkg/pull/13264 solve most of the problems, but introduced this regression.

port-bug

Most helpful comment

@traversaro, the official config name update to assimpConfig.cmake, so we may not change it to assimp-config.cmake

See https://github.com/assimp/assimp/blob/master/CMakeLists.txt#L406.

I know, I was the one adding that line (see https://github.com/assimp/assimp/pull/3455). : )

Both assimpConfig.cmake and assimp-config.cmake for me are ok, as it means that the official way of finding the searching for assimp is:
~
find_package(assimp REQUIRED)
~

The problem is that instead vcpkg is suggesting to use find_package(Assimp REQUIRED) that, is not compatible with the config file names assimpConfig.cmake . I suggested to use assimp-config.cmake just because the -config variant will work (on case sensitive filesystem) with both find_package(Assimp) and find_package(assimp), providing back-compatibility. This is because ***Config.cmake and ***-config.cmake files are not equivalent, but rather (from https://cmake.org/cmake/help/v3.19/command/find_package.html#full-signature-and-config-mode):

The command searches for a file called <PackageName>Config.cmake or <lower-case-package-name>-config.cmake for each name specified.

So, brief recap:

  • Switching to assimp-config.cmake as originally suggested by this issue ensures back-compatibility with both find_package(assimp) and find_package(Assimp)
  • Using assimpConfig.cmake as suggested by @PhoebeHui for me is perfectly fine, the important thing (and the main point of the issue) is not using AssimpConfig.cmake

All 3 comments

@traversaro, the official config name update to assimpConfig.cmake, so we may not change it to assimp-config.cmake

See https://github.com/assimp/assimp/blob/master/CMakeLists.txt#L406.

@traversaro, the official config name update to assimpConfig.cmake, so we may not change it to assimp-config.cmake

See https://github.com/assimp/assimp/blob/master/CMakeLists.txt#L406.

I know, I was the one adding that line (see https://github.com/assimp/assimp/pull/3455). : )

Both assimpConfig.cmake and assimp-config.cmake for me are ok, as it means that the official way of finding the searching for assimp is:
~
find_package(assimp REQUIRED)
~

The problem is that instead vcpkg is suggesting to use find_package(Assimp REQUIRED) that, is not compatible with the config file names assimpConfig.cmake . I suggested to use assimp-config.cmake just because the -config variant will work (on case sensitive filesystem) with both find_package(Assimp) and find_package(assimp), providing back-compatibility. This is because ***Config.cmake and ***-config.cmake files are not equivalent, but rather (from https://cmake.org/cmake/help/v3.19/command/find_package.html#full-signature-and-config-mode):

The command searches for a file called <PackageName>Config.cmake or <lower-case-package-name>-config.cmake for each name specified.

So, brief recap:

  • Switching to assimp-config.cmake as originally suggested by this issue ensures back-compatibility with both find_package(assimp) and find_package(Assimp)
  • Using assimpConfig.cmake as suggested by @PhoebeHui for me is perfectly fine, the important thing (and the main point of the issue) is not using AssimpConfig.cmake

I will summit a PR to fix this, thanks for bringing this up!

Was this page helpful?
0 / 5 - 0 ratings