cmake: fix windows build when building with static libraries
On Windows, __declspec(dllimport) changes the name of the symbol to what
would be provided by the .lib accompanying the .dll. When generating a
static library, the .lib provides the original name, resulting in undefined
symbols during linking.
On Linux and MacOS, __attribute__((visibility ("default"))) changes the
visibility of the symbol and would cause it to be exported from any library
linking against libipt.a. That's not necessarily the desired behaviour.
When using static libraries, we don't really need to export/import anything.
Signed-off-by: Markus Metzger <firstname.lastname@example.org>
3 files changed