CMake support

51 views
Skip to first unread message

Clark Kent

unread,
Sep 11, 2022, 12:38:26 PM9/11/22
to skia-discuss
is it possible to generate CMake files from GN ?

also does skia itself support such build?

for example, given



K:/SkiaSharp-Google/externals/skia/bin/gn.exe gen out/windows/x64 --script-executable="python3" --args=" SKIA_C_PATH=\"K:/SkiaSharp-Google/externals/skia/out/windows/x64\" target_os=\"win\" target_cpu=\"x64\" skia_enable_fontmgr_win_gdi=false skia_use_dng_sdk=true skia_use_icu=false skia_use_piex=true skia_use_sfntly=false skia_use_system_expat=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_enable_skottie=true skia_use_vulkan=true clang_win=\"C:/Program Files/LLVM\" win_vcvars_version=\"14.2\" extra_cflags=[ \"-DSKIA_C_DLL\", \"/MT\", \"/EHsc\", \"/Z7\", \"-D_HAS_AUTO_PTR_ETC=1\" ] extra_ldflags=[ \"/DEBUG:FULL\" ]  skia_enable_tools=false  is_official_build=true "



we would generate a cmake file that when executed by cmake, would be equivilant to

K:/SkiaSharp-Google/externals/depot_tools/ninja.exe -C out/windows/x64 SkiaSharp;

Ben Wagner

unread,
Sep 19, 2022, 9:51:43 AM9/19/22
to skia-d...@googlegroups.com
https://skia.googlesource.com/skia/+/210a0e6efb9f4da9ea8286315348b17bc5cb8429/gn/gn_to_cmake.py

Note that this is only lightly maintained these days, and mostly used
as a way to provide a way for editors that understand cmake to
properly provide code completion and the like. In theory it can also
sometimes build things, but probably won't always be correct.
> --
> You received this message because you are subscribed to the Google Groups "skia-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/3ad05b75-cfbf-4294-ad83-1bb36171505en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages