-
|
In my header, I have this little snippet to properly export symbols. #if defined(_WIN32) && !defined(FFMS_STATIC)
# if defined(FFMS_EXPORTS)
# define FFMS_API(ret) FFMS_EXTERN_C __declspec(dllexport) ret FFMS_CC
# else
# define FFMS_API(ret) FFMS_EXTERN_C __declspec(dllimport) ret FFMS_CC
# endif
#elif defined(__GNUC__) && __GNUC__ >= 4
# define FFMS_API(ret) FFMS_EXTERN_C __attribute__((visibility("default"))) ret FFMS_CC
#else
# define FFMS_API(ret) FFMS_EXTERN_C ret FFMS_CC
#endifTo avoid using ffms2_lib = library(
XXX,
cpp_args: ['-DFFMS_EXPORTS'],
cpp_static_args: ['-DFFMS_STATIC'],
)But, the problem is how can I tell the consumer of ffms2_dep = declare_dependency(
link_with: ffms2_lib,
include_directories: includes,
# How to specify '-DFFMS_STATIC', but only for static lib?
)
meson.override_dependency('ffms2', ffms2_dep)I have the same problem with pkg_config = import('pkgconfig')
pkg_config.generate(
ffms2_lib,
# How to specify '-DFFMS_STATIC', but only for static lib?
) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Yes, you should be able to add static arguments to I am actively working on the problem, but there's a lot of core refactoring that needs to be finished before we'll be able to get there. |
Beta Was this translation helpful? Give feedback.
Yes, you should be able to add static arguments to
declare_dependencies, as well as shared arguments, and per-language arguments like you can to build targets: #5723I am actively working on the problem, but there's a lot of core refactoring that needs to be finished before we'll be able to get there.