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
To Reproduce
Steps to reproduce the behavior:
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.
@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.cmakeor<lower-case-package-name>-config.cmakefor each name specified.
So, brief recap:
assimp-config.cmake as originally suggested by this issue ensures back-compatibility with both find_package(assimp) and find_package(Assimp) 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!
Most helpful comment
I know, I was the one adding that line (see https://github.com/assimp/assimp/pull/3455). : )
Both
assimpConfig.cmakeandassimp-config.cmakefor 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 namesassimpConfig.cmake. I suggested to useassimp-config.cmakejust because the-configvariant will work (on case sensitive filesystem) with bothfind_package(Assimp)andfind_package(assimp), providing back-compatibility. This is because***Config.cmakeand***-config.cmakefiles are not equivalent, but rather (from https://cmake.org/cmake/help/v3.19/command/find_package.html#full-signature-and-config-mode):So, brief recap:
assimp-config.cmakeas originally suggested by this issue ensures back-compatibility with bothfind_package(assimp)andfind_package(Assimp)assimpConfig.cmakeas suggested by @PhoebeHui for me is perfectly fine, the important thing (and the main point of the issue) is not usingAssimpConfig.cmake