Skip to content

Conversation

roehling
Copy link

@roehling roehling commented Oct 16, 2025

This is a rewrite of the CMake configuration that removes a lot of legacy code which is no longer needed and makes the build system more convoluted than necessary.

By switching to modern CMake semantics, we gain the following advantages:

  • Include directories and dependent libraries are associated with the exported target, no additional configuration beyond target_link_libraries() required.

  • Built-in Qt MOC and UIC handling

  • Proper separation of build and install interface; this also makes RPATH just work out of the box without additional configuration.

  • Native build of vendored QGLViewer library, no need to call qmake and import the result.

  • Proper handling and versioning of dependencies. No hard-coded build paths showing up in unexpected places.

@ahornung ahornung added the CMake label Oct 17, 2025
@ahornung
Copy link
Member

ahornung commented Oct 17, 2025

Thanks a lot, that seems long overdue! I haven't had a chance to look at all the changes yet, but could this also solve some of the other issues related to CMake (#392 #321 #225 #223 #270 )?

Ping @wxmerkt @mwoehlke-kitware @SpaceIm just to get some additional input.

This is a rewrite of the CMake configuration that removes a lot of
legacy code which is no longer needed and makes the build system more
convoluted than necessary.

By switching to modern CMake semantics, we gain the following
advantages:

* Include directories and dependent libraries are associated with the
exported target, no additional configuration beyond
target_link_libraries() required.

* Built-in Qt MOC and UIC handling

* Proper separation of build and install interface; this also makes
RPATH just work out of the box without additional configuration.

* Native build of vendored QGLViewer library, no need to call qmake and
import the result.

* Proper handling and versioning of dependencies. No hard-coded build
paths showing up in unexpected places.

Signed-off-by: Timo Röhling <[email protected]>
@roehling
Copy link
Author

I believe this might actually solve all the issues you listed. :)

Btw, I just force-pushed the branch because there was a typo in the commit message and I also forgot a closing parenthesis in the octovis config script (which only causes an issue if the system QGLViewer is used). I'll gladly fix any other bugs you encounter. I also made some design choices which I think are good but YMMV. I'm open to suggestions if you think something should be solved differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants