-
Notifications
You must be signed in to change notification settings - Fork 207
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
cwalk: fix compilation when both shared and static is wanted #1566
base: master
Are you sure you want to change the base?
Conversation
5a65be1
to
8308a94
Compare
8308a94
to
16d2627
Compare
In MS compilers, this is producing a lot of warnings:
|
AFAIK, that's a Windows only solution, and #if defined(_WIN32) || defined(__CYGWIN__)
#define CWK_EXPORT __declspec(dllexport)
#define CWK_IMPORT __declspec(dllimport)
#elif __GNUC__ >= 4
#define CWK_EXPORT __attribute__((visibility("default")))
#define CWK_IMPORT __attribute__((visibility("default")))
#else
#define CWK_EXPORT
#define CWK_IMPORT
#endif
#if defined(CWK_SHARED)
#if defined(CWK_EXPORTS)
#define CWK_PUBLIC CWK_EXPORT
#else
#define CWK_PUBLIC CWK_IMPORT
#endif
#else
#define CWK_PUBLIC
#endif However, the |
That's because Additionally, target_compile_definitions(cwalk PUBLIC CWK_SHARED) So it should be added to the |
You'll need to declare 2 dependencies, and use |
And switch to this syntax in the wrap: [provide]
dependency_names = cwalk |
16d2627
to
3d20aaa
Compare
Finally found some time to get back to this but...
I do not know how to do this. Could you provide a detailed description please? Thanks @benoit-pierre ! |
This is a follow up of #1387
I am trying to improve on the already merged meson script by allowing compilation of both static and dynamic libs simultaneously with the proper arguments. This tryes to implement what @benoit-pierre suggested...
Also adding @likle from upstream...
From meson maintainers, would this be desirable or would a "def" file provide any other desirable behaviour?
Thanks