行业知识
Skia最新版CMake编译
2026-11-15 12:48:14
来源:互联网转载
运行���例:example/HelloWorld.cpp
Skia:
2024年03月08日
master分支: 993a88a663c817fce23d47394b574e19d9991f2f
使用CMake编译
python tools/git-sync-deps
bin/gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py
此时output目录会生成CMakeLists.txt
可能的报错
- macOS可能缺少libuuid
报错:
#define JIB_RESERVED_SIZE ((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48)struct JournalInfoBlock {u_int32_tflags; u_int32_t device_signature[8]; // signature used to locate our device.u_int64_t offset; // byte offset to the journal on the deviceu_int64_t size; // size in bytes of the journaluuid_string_t ext_jnl_uuid;char machine_serial_num[48];char reserved[JIB_RESERVED_SIZE];} __attribute__((aligned(2), packed));typedef struct JournalInfoBlock JournalInfoBlock;解决:
brew install libuuid
编译和运行示例
cd skiamkdir -p out/config/buildcd out/config/buildcmake ..make HelloWorld -j32./HelloWorld
即可得到文章开头的截图。