Skip to content

Conversation

@traversaro
Copy link
Contributor

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.

Furthermore, the -Wno-unused-parameter is a GCC/Clang specific compilations option, so I moved it in the existing if for adding GCC/Clang specific compilations options.

Copy link
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

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

Thank you very much for contributing this.

@urfeex urfeex merged commit 9dae45a into UniversalRobots:main Jun 16, 2025
3 of 10 checks passed
mergify bot pushed a commit that referenced this pull request Jun 16, 2025
mergify bot pushed a commit that referenced this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants