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

Fix static library build #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mertemba
Copy link

@mertemba mertemba commented Feb 4, 2025

The libsocketConfig.cmake.in assumes that the library target is called socket++, but the static library is currently called socket++_int. Thus, using the static build of libsocket with FetchContent is currently broken.

This commit changes the static library target name to the same as the shared library. The drawback is that now BUILD_SHARED_LIBS and BUILD_STATIC_LIBS cannot be enabled both at the same time, because it would lead to a name collision.

@dermesser
Copy link
Owner

Thank you for reporting this. However, given that the build process has been very stable for the past few years, would it be an option to change libsocketConfig.cmake.in to set socket++_int as library to link against? That would prevent breakage for those users who currently might build both static and dynamic libraries, wouldn't it?

@mertemba
Copy link
Author

Thank you for the quick reply. I'm no expert for ...Config.cmake.in files, but I'll try adding socket++_int or something else to make building both static and dynamic libraries work. I'll get back to you.

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.

2 participants