-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Findassimp w/ current master #376
Comments
cc @traversaro |
Point 1. Is a bug, should be fixed by #377 . Point 2. is a bug upstream in Ubuntu, the idea of vendoring the |
To understand which workaround we need to add, can post the content of
|
I am not sure I understood correctly! Do you want me to post here the content of the file from my Ubuntu installation? |
Yes! |
Here they are:
|
So apparently this version of the config file does not provided imported targets. Perhaps the best strategy is to add the following logic before https://github.com/robotology/ycm/pull/377/files#diff-0678d0da3d35c8ff51d6b1836194654c132b4230b5d5c74c036d46583e0f06d0R84 : if(NOT TARGET assimp::assimp)
add_library(assimp::assimp UNKNOWN IMPORTED)
set_target_properties(assimp::assimp PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ASSIMP_INCLUDE_DIRS}")
set_property(TARGET assimp::assimp APPEND PROPERTY
IMPORTED_LOCATION "${ASSIMP_LIBRARY_DIRS}/${ASSIMP_LIBRARIES}")
endif() Can you try it and check if it works, and in that case open a PR? Thanks!
|
With that addition, the However, a library, using Trying to compile superimpose-mesh-lib/devel I get, after all the single compilation units are processed,
|
Yes the problem is that if(NOT TARGET assimp::assimp)
add_library(assimp::assimp UNKNOWN IMPORTED)
set_target_properties(assimp::assimp PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ASSIMP_INCLUDE_DIRS}")
find_library(_ycm_ASSIMP_LIBRARY NAMES assimp libassimp PATHS ${ASSIMP_LIBRARY_DIRS})
mark_as_advanced(_ycm_ASSIMP_LIBRARY)
set_property(TARGET assimp::assimp APPEND PROPERTY
IMPORTED_LOCATION "${_ycm_ASSIMP_LIBRARY}")
endif() |
Thank you @traversaro, now it is working. I will open a PR. |
I am using
Ubuntu 18.04
,libassimp-dev 4.1.0~dfsg-3
andCMake 3.20
.When using YCM 0.12.1 I can successfully use the following
CMakeLists.txt
(and build)Instead, using the latest master two issues occur:
find_package_handle_standard_args
cannot be found inhttps://github.com/robotology/ycm/blob/32c38ef8d68d77ee2fc96c4dae4338b06bea457e/find-modules/Findassimp.cmake#L84
include (FindPackageHandleStandardArgs)
before being able to use such command. After adding it toFindassimp.cmake
however I get this:Am I doing something wrong?
The text was updated successfully, but these errors were encountered: