Skip to content

Adding-to-Other-Software link dead in wiki #22

@htp2

Description

@htp2

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:

How do I incorporate this library into my software?
The xReg library is most easily incorporated using standard CMake practices, such as add_subdirectory() and find_package(). See this page for more details.

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):

project(cm_robot_regi)
cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR)
set (CMAKE_CXX_STANDARD "17" CACHE STRING "C++ Standard (needs at least 17)")
find_package(xreg REQUIRED HINTS ~/xreg/build)
add_executable(TEST_EXE test.cpp)
target_link_libraries(TEST_EXE xreg::xreg)

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 the target_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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions