Skip to content

[RFC] cmake: targets: check lib or lib64 path - #3035

Merged
kimkulling merged 6 commits into
assimp:masterfrom
maquefel:cmake_targets_determine_lib_path
Apr 16, 2020
Merged

kimkulling merged 6 commits into
assimp:masterfrom
maquefel:cmake_targets_determine_lib_path

Conversation

@maquefel

Copy link
Copy Markdown
Contributor

Linkage against lib or lib64 should be taken into assumption.

Without it we get:

The imported target "assimp::assimp" references the file

 "/usr/lib/libassimp.so.5"

When compiling against x86_64 target. The library of couse exits in
/usr/lib64.

see:
https://cmake.org/cmake/help/v3.17/prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS.html

As i am not a master of cmake this should be double checked if
it doesn't break anything.

Signed-off-by: Nikita Shubin [email protected]

Linkage against lib or lib64 should be taken into assumption.

Without it we get:

The imported target "assimp::assimp" references the file

     "/usr/lib/libassimp.so.5"

When compiling against x86_64 target. The library of couse exits in
/usr/lib64.

see:
https://cmake.org/cmake/help/v3.17/prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS.html

As i am not a master of cmake this should be double checked if
it doesn't break anything.

Signed-off-by: Nikita Shubin <[email protected]>
@maquefel

Copy link
Copy Markdown
Contributor Author

Might be related to #2719

@vmatare

vmatare commented Mar 31, 2020

Copy link
Copy Markdown
Contributor

When compiling against x86_64 target. The library of couse exits in
/usr/lib64.

see:
https://cmake.org/cmake/help/v3.17/prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS.html

It is stated nowhere that libs always live in /usr/lib64 on a 64-bit system. In fact, the FHS makes pretty explicit the fact that this is "commonly used", but in no way part of the standard: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s10.html

@umlaeute

umlaeute commented Apr 2, 2020

Copy link
Copy Markdown
Contributor

esp. Debian based systems (Ubuntu, Mint,...) use a multi-arch approach that goes way beyond supporting a "32bit and 64bit variants of the same CPU" and does not use the lib64/ folders

@kimkulling
kimkulling merged commit 4b544f8 into assimp:master Apr 16, 2020
@kimkulling

Copy link
Copy Markdown
Member

Merged, thanks a lot for your contribution.

@vmatare

vmatare commented Apr 16, 2020

Copy link
Copy Markdown
Contributor

@kimkulling I don't think merging this was a good idea. Just guessing that libs will be in lib64 is plain wrong, as I've stated before and others have confirmed. The whole stuff is not just superseded by #3115, but also incompatible, in that it uses variables that aren't defined any more. That is something that should have been visible in the merge conflicts in 2d4eab6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants