-
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
DARTConfig relies on exported targets rather than find_library. #630
Conversation
…generated targets list rather than find_library.
I have a two additional suggestions:
Neither of these are critical, but it would be nice to follow CMake conventions where possible. |
Just to clarify for my own edification, when we call |
From my reading, the (autogenerated)
So, CMake knows that there is a library called When we set the variable @mkoval, feel free to chime in if I've misstated the process. |
Yes, @a-price's explanation is completely correct.
CMake is smart enough to figure this out if you use |
Per suggestion, I added the |
I don't think we need to set |
👍 |
1 similar comment
👍 |
If there are no objections, can we merge this? |
Sure, merging. |
DARTConfig relies on exported targets rather than find_library.
Referencing the recommendations here: https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file and here: https://cmake.org/pipermail/cmake/2011-June/045050.html, I changed the DARTConfig file to refer to the autogenerated targets in DARTTargets.cmake, rather than searching for them with find_library.
This resolves issue #629 on my machine. An updated test project is attached.
CMakeLists.txt
test.txt