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

Inconsistent CMake package and target names #355

Open
dg0yt opened this issue Oct 22, 2023 · 0 comments
Open

Inconsistent CMake package and target names #355

dg0yt opened this issue Oct 22, 2023 · 0 comments

Comments

@dg0yt
Copy link

dg0yt commented Oct 22, 2023

The installed CMake config package and target names vary depending on platform. On windows, users need:

find_package(libsbml)
target_link_libraries(main PRIVATE libsbml)

but on other platforms, it is:

find_package(sbml)
target_link_libraries(main PRIVATE sbml)

This is extremely inconvenient for cross-platforms users, and against of the intention of CMake config to abstract from implementation details. (And I do not refer to the fact that static library linkage adds a -static suffix.)

I suggest to standardize on sbml for both package and target basename.
If there is a desire to add a lib prefix to MSVC import or runtime libraries, this can be achieved e.g. by adjusting the OUTPUT_NAME target property.
Alternatively, standardize on libsbml if there is also sbml tool.

Maybe this opportunity could be used to add an sbml:: namespace prefix to the exported target names,
and to move the sbml-target into the sbml cmake package, too.

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

No branches or pull requests

1 participant