Open htp2 opened 1 year ago
Hi Henry,
Thanks a lot for your comment, it's nice to hear from you.
I'm sorry that I have not written the wiki page yet for this question, but maybe by working on this we can have a good example to use.
I think your approach makes sense. You can see on this repository that I have a collection of other applications that link to a version of xreg that is built separate. In that CMakeLists.txt, the find_packages for ITK and VTK are done AFTER the find_package for xreg.
I would try the following (at least to get started):
CMAKE_PREFIX_PATH
either as an environment variable or CMake variable to point to your dependencies and xreg build. This will avoid incompatible system versions being given preference.I can see this having problems if your other software has the same dependencies, but conflicting versions. Is that the case here?
Hi Rob, hope you are well.
I noticed the link in one of the FAQs in the wiki does not work. I was hoping to use
xreg
as a dependency for other code, was having some issues, and thought that whatever may have been linked here in the past could have been helpful. I've replicated the portion on the wiki below:I will briefly ask your opinion on what I am trying to do and see if you have a quick suggestion: I have been using / expanding on some of Cong's 2d/3d CM registration work. I would prefer not to continue using an 'unofficial fork' of xreg as has been done to this point, but rather build xreg and then use it as a dependency for any custom code development. This development doesn't lend itself to living within xreg (e.g. specific applications for our robot and ROS wrappers for triggering image registration, etc.).
At the moment, the plan is as follows: Build xreg e.g. at
~/xreg/
and then have a separate package e.g. at~/cm_robot_regi/
that would find and use xreg as a dependency.An excerpt from the CMakeLists for
cm_robot_regi
might be something like (where test.cpp has some xreg includes):This doesn't work as I've written it, at the moment it seems like I may need to add additional
find_package()
for e.g. VTK, ITK, etc. (I get cmake errors expecting links to e.g. VTK::XYZ whenever I do thetarget_link_libraries()
). I'm pursuing this avenue, but I feel I might be missing the big picture here.I'm interested in your thoughts: 1) does this approach make sense? and 2) do you have a better suggested method for doing it if so?
Thanks!