Skip to content
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

Make libcitygml prebuilds portable #98

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gostefan
Copy link
Contributor

@gostefan gostefan commented Aug 1, 2024

The current state of the CMakeLists.txt doesn't allow libcitygml to be prebuilt and deployed on different machines or to different paths.
With some simple fixes we can enable this usecase.

This PR is only about the last two commits - the three previous commits are part a different PR. But the changes would conflict if not based on each other.
If I should rather modify this PR to only include the last two commits, please let me know.

If these are public libraries a client build system needs to link
to them again even libcitygml was compiled into a self-contained
dynamic library.
@gostefan
Copy link
Contributor Author

gostefan commented Aug 7, 2024

I just realized that now the citygml.pc file doesn't get installed correctly anymore. I'll fix that but probably it'll take me some time.

Ok... I realized that it's much easier than I thought - already pushed the new version.

@gostefan
Copy link
Contributor Author

The first commit introduced a regression on linux. The CMake files weren't installed in the lib folder anymore.
This was because an include was missing and is fixed now.

CMake's install will combine the relative path with the
absolute path passed via CMAKE_INSTALL_PREFIX. This
shouldn't be handled in CMakeLists.txt files.

The state before resulted in absolute paths being
used in citygmlConfig.cmake. That prohibits prebuilding
the library and deploying it on other machines/paths.
It's unclear why the lib install folders worked without
this before. But now the CMake files get correctly
installed.
@gostefan
Copy link
Contributor Author

Trying to use the built project on Linux made me realize that the cmake files still had some absolute paths in them.
Fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant