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

build: cmake: remove lib prefix on Windows #258

Merged
merged 2 commits into from
Apr 27, 2021

Conversation

fcelda
Copy link
Contributor

@fcelda fcelda commented Apr 27, 2021

CMAKE_SHARED_LIBRARY_PREFIX defaults to lib on UNIX systems but to an empty string on Windows which follows the conventions on these systems. The existing build forces the prefix on all platforms so the dynamic library produced by this setup on Windows will be libmaxminddb.dll (instead of maxminddb.dll).

This patch just removes the explicit configuration of the prefix so the dynamic library on Linux will be libmaxminddb.so and maxminddb.dll on Windows.

I'm not sure if this hard-coded prefix was intentional. I'm working on Conan package for libmaxmminddb and I have to include this patch to make linking work on Windows. It could be something specific to Conan though but I think the change makes sense.

oschwald
oschwald previously approved these changes Apr 27, 2021
Copy link
Member

@oschwald oschwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears I added these when first creating the build. I don't think I put much thought into them or had a good reason. Thanks for the explanation of the issue!

@oschwald oschwald merged commit f898d8d into maxmind:main Apr 27, 2021
@fcelda fcelda deleted the cmake-lib-prefix branch April 28, 2021 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants