cmake构建时自动生成mk_export头文件,解决msvc链接设备问题 (#1660)

* 解决msvc下链接问题
* CMAKE添加自动生成mk api export头文件
* 兼容非cmake构建时情况

Co-authored-by: baiyfcu <baiyfcu@gmail.com>
This commit is contained in:
夏楚
2022-05-26 20:30:43 +08:00
committed by GitHub
parent 989e7b2e75
commit e2908e9775
7 changed files with 40 additions and 27 deletions

View File

@@ -17,7 +17,7 @@
using namespace mediakit;
extern "C" {
#define XX(name, type, value, str, mpeg_id) const int MK##name = value;
#define XX(name, type, value, str, mpeg_id) API_EXPORT const int MK##name = value;
CODEC_MAP(XX)
#undef XX
}