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

Add Windows support for shared libraries #1043

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

Conversation

traversaro
Copy link

@traversaro traversaro commented Jan 6, 2025

The package compiles a library, but does not expose any symbol on Windows, so if the CMake project is compiled with -DBUILD_SHARED_LIBS:BOOL=ON on Windows, no library is actually generated.

On Linux and macOS, everything compiles fine with -DBUILD_SHARED_LIBS:BOOL=ON as by default all the symbols are visible. We can achieve exactly the same behavior in Windows by setting to ON the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS CMake variable, so this PR sets the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS variable to ON, to ensure that the compilation with -DBUILD_SHARED_LIBS:BOOL=ON works fine on Windows.

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