-
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
install_basic_package_files(EXPORT) does not cope well with targets at YCM 0.8.0 #148
Comments
Explicitly setting library types as a workaround (or a hack) to: robotology/ycm-cmake-modules#148
@PeterBowman I think b05ed7e fixes the problem. Regarding the comment about |
Thanks, @drdanz, I can confirm the target passed to
I don't think there is a simple solution for this (apart from accepting
See #150. |
Thanks @PeterBowman. Unfortunately, the optimal solution would be to be able to "read" the targets defined in one EXPORT, but I couldn't find any way to do that, I don't think this is allowed by CMake... It would be probably a good idea to open an issue upstream in CMake.
The
True. On the other hand, it will bring in the dependencies even if the target that depends on them is shared and there is at least one other target that is static. I don't think there is an easy solution to that. Anyway, I think that all of this goes a little bit beyond the goal of this module, the I'm closing this, but feel free to reopen this or to continue the discussion (either here or in #150). |
The new
EXPORT
command toinstall_basic_package_files()
and previously availableTARGETS
/TARGETS_PROPERTY
/TARGETS_PROPERTIES
are mutually exclusive (ref). However, there is an internal list of targets this command handles that defaults to the project name when usingEXPORT
(ref) and cannot be tweaked due to said exclusion. This list is used in two places across the code and ignores custom project targets:install_basic_package_files()
generates a basic one.BUILD_SHARED_LIBS=ON
, all listed targets are tested against its type.Regarding the former, generated config files are mostly useless and will lead to errors in downstreams. Check it with the following sample project:
In
${CMAKE_BINARY_DIR}/MY_TEST_PROJECTConfig.cmake
, there are several references toMY_TEST_PROJECT::MY_TEST_PROJECT
while it should beMY_TEST_PROJECT::my_test_target
.Regarding the latter, and if
BUILD_SHARED_LIBS
is set (uncomment the line in my previous example), the configure step crashes with:I don't think the
BUILD_SHARED_LIBS
variable should be checked against at all (see 0e0d0f5#r29318076), therefore this error would be raised at all times.The text was updated successfully, but these errors were encountered: