Orc users mustn't use __declspec(dllimport) when
linking against a static liborc.
if get_option('default_library') == 'static'
orc_lib = orc_sta
+ orc_dep_cargs = ['-DORC_STATIC_COMPILATION']
else
orc_lib = orc_shr
+ orc_dep_cargs = []
endif
orc_dep = declare_dependency(include_directories : orc_inc,
dependencies : orc_dependencies,
+ compile_args : orc_dep_cargs,
link_with : orc_lib)
executable ('generate-bytecode',
/* FIXME: unused, remove */
#define ORC_EXPORT
-#if defined(_MSC_VER) || defined(_WIN32)
+#if (defined(_MSC_VER) || defined(_WIN32)) && !defined(ORC_STATIC_COMPILATION)
#define ORC_API_IMPORT __declspec(dllimport) extern
#else
#define ORC_API_IMPORT extern