diff options
-rw-r--r-- | RepositoryExternal.mk | 15 | ||||
-rw-r--r-- | external/skia/Module_skia.mk | 2 | ||||
-rw-r--r-- | external/skia/StaticLibrary_skia.mk (renamed from external/skia/Library_skia.mk) | 85 | ||||
-rw-r--r-- | solenv/gbuild/PrecompiledHeaders.mk | 1 | ||||
-rw-r--r-- | vcl/Library_vclplug_gen.mk | 4 | ||||
-rw-r--r-- | vcl/Library_vclplug_osx.mk | 5 | ||||
-rw-r--r-- | vcl/Library_vclplug_win.mk | 8 |
7 files changed, 69 insertions, 51 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 60499758de40..ffe20765c2fa 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -135,15 +135,20 @@ $(call gb_LinkTarget_set_include,$(1),\ -I$(SRCDIR)/external/skia/inc/ \ $$(INCLUDE) \ ) -$(call gb_LinkTarget_use_libraries,$(1),skia) +$(call gb_LinkTarget_use_static_libraries,$(1),skia) $(call gb_LinkTarget_add_defs,$(1),\ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ - -DSKIA_DLL \ ) + endef -$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\ - skia \ -)) + +define gb_ExternalProject__use_skia +$(call gb_ExternalProject_use_static_libraries,$(1),\ + skia \ +) + +endef + endif ifeq (SANE,$(filter SANE,$(BUILD_TYPE))) diff --git a/external/skia/Module_skia.mk b/external/skia/Module_skia.mk index 4cb8b51570df..44cc06542c48 100644 --- a/external/skia/Module_skia.mk +++ b/external/skia/Module_skia.mk @@ -11,7 +11,7 @@ $(eval $(call gb_Module_Module,skia)) $(eval $(call gb_Module_add_targets,skia,\ UnpackedTarball_skia \ - Library_skia \ + StaticLibrary_skia \ )) diff --git a/external/skia/Library_skia.mk b/external/skia/StaticLibrary_skia.mk index c2163d299327..250f846f51a6 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/StaticLibrary_skia.mk @@ -7,19 +7,18 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Library_Library,skia)) +$(eval $(call gb_StaticLibrary_StaticLibrary,skia)) -$(eval $(call gb_Library_set_warnings_disabled,skia)) +$(eval $(call gb_StaticLibrary_set_warnings_disabled,skia)) -$(eval $(call gb_Library_use_unpacked,skia,skia)) +$(eval $(call gb_StaticLibrary_use_unpacked,skia,skia)) -$(eval $(call gb_Library_use_clang,skia)) +$(eval $(call gb_StaticLibrary_use_clang,skia)) #This currently results in all sorts of compile complaints -#$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) +#$(eval $(call gb_StaticLibrary_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DSKIA_IMPLEMENTATION=1 \ - -DSKIA_DLL \ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ $(if $(filter INTEL,$(CPUNAME)),$(if $(filter WNT,$(OS)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE1,-DSK_CPU_SSE_LEVEL=0)) \ $(if $(filter X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \ @@ -32,7 +31,7 @@ $(eval $(call gb_Library_add_defs,skia,\ # Some code may be always built with optimizations, even with Skia debug enabled (see # $(gb_COMPILEROPTFLAGS) usage). ifeq ($(ENABLE_SKIA_DEBUG),) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ $(gb_COMPILEROPTFLAGS) \ $(PCH_NO_CODEGEN) \ )) @@ -41,11 +40,11 @@ endif ifeq ($(OS),WNT) # Skia can be built with or without UNICODE set, in LO sources we explicitly use the *W unicode # variants, so build Skia with UNICODE to make it also use the *W variants. -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DUNICODE -D_UNICODE \ )) ifneq ($(gb_ENABLE_PCH),) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ -FIsrc/utils/win/SkDWriteNTDDI_VERSION.h \ )) endif @@ -53,13 +52,13 @@ endif # The clang-cl provided with at least VS 2019 16.11.28 is known-broken with -std:c++20: ifneq ($(filter -std:c++20,$(CXXFLAGS_CXX11)),) ifeq ($(LO_CLANG_VERSION),120000) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ -std:c++17 \ )) endif endif -$(eval $(call gb_Library_use_system_win32_libs,skia,\ +$(eval $(call gb_StaticLibrary_use_system_win32_libs,skia,\ fontsub \ ole32 \ oleaut32 \ @@ -80,7 +79,7 @@ endif else ifeq ($(OS),MACOSX) -$(eval $(call gb_Library_use_system_darwin_frameworks,skia,\ +$(eval $(call gb_StaticLibrary_use_system_darwin_frameworks,skia,\ Cocoa \ Metal \ QuartzCore \ @@ -88,13 +87,13 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,skia,\ ifneq ($(SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX),) # Disable std::shared_mutex usage on MacOSX < 10.12. -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DVMA_USE_STL_SHARED_MUTEX=0 \ )) endif else -$(eval $(call gb_Library_use_externals,skia,\ +$(eval $(call gb_StaticLibrary_use_externals,skia,\ expat \ freetype \ fontconfig \ @@ -102,14 +101,14 @@ $(eval $(call gb_Library_use_externals,skia,\ endif # we don't enable jpeg for skia, but it has incorrect #ifdef's in places -$(eval $(call gb_Library_use_externals,skia,\ +$(eval $(call gb_StaticLibrary_use_externals,skia,\ zlib \ libjpeg \ libpng \ )) ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_libs,skia,\ +$(eval $(call gb_StaticLibrary_add_libs,skia,\ -lm \ -ldl \ -lX11-xcb \ @@ -117,11 +116,11 @@ $(eval $(call gb_Library_add_libs,skia,\ )) endif -$(eval $(call gb_Library_use_libraries,skia,\ +$(eval $(call gb_StaticLibrary_use_libraries,skia,\ sal \ )) -$(eval $(call gb_Library_set_include,skia,\ +$(eval $(call gb_StaticLibrary_set_include,skia,\ $$(INCLUDE) \ -I$(call gb_UnpackedTarball_get_dir,skia) \ -I$(call gb_UnpackedTarball_get_dir,skia)/modules/skcms/ \ @@ -130,15 +129,15 @@ $(eval $(call gb_Library_set_include,skia,\ -I$(SRCDIR)/external/skia/inc/ \ )) -$(eval $(call gb_Library_add_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_exception_objects,skia,\ external/skia/source/SkMemory_malloc \ external/skia/source/skia_compiler \ external/skia/source/skia_opts \ )) -$(eval $(call gb_Library_set_generated_cxx_suffix,skia,cpp)) +$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,skia,cpp)) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/base/SkArenaAlloc \ UnpackedTarball/skia/src/base/SkBezierCurves \ UnpackedTarball/skia/src/base/SkBlockAllocator \ @@ -617,7 +616,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ )) ifneq ($(SKIA_GPU),) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkGpuBlurUtils \ UnpackedTarball/skia/src/gpu/AtlasTypes \ UnpackedTarball/skia/src/gpu/Blend \ @@ -812,7 +811,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/text/gpu/VertexFiller \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/ganesh/GrAuditTrail \ UnpackedTarball/skia/src/gpu/ganesh/GrBlurUtils \ UnpackedTarball/skia/src/gpu/ganesh/GrDrawOpTest \ @@ -858,7 +857,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ )) ifeq ($(SKIA_GPU),VULKAN) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkBuffer \ UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkCaps \ UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkCommandBuffer \ @@ -896,7 +895,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/vk/VulkanMemory \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/tools/gpu/vk/VkTestUtils \ UnpackedTarball/skia/tools/sk_app/VulkanWindowContext \ UnpackedTarball/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator \ @@ -905,42 +904,42 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ endif endif -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/ports/SkGlobalInitialization_default \ UnpackedTarball/skia/src/ports/SkImageGenerator_none \ UnpackedTarball/skia/src/ports/SkOSFile_stdio \ )) -$(eval $(call gb_Library_add_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_exception_objects,skia,\ external/skia/source/skia_opts_ssse3, $(CXXFLAGS_INTRINSICS_SSSE3) $(LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3) \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/opts/SkOpts_avx, $(CXXFLAGS_INTRINSICS_AVX) $(LO_CLANG_CXXFLAGS_INTRINSICS_AVX) \ $(LO_SKIA_AVOID_INLINE_COPIES) \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/opts/SkOpts_hsw, \ $(CXXFLAGS_INTRINSICS_AVX2) $(CXXFLAGS_INTRINSICS_F16C) $(CXXFLAGS_INTRINSICS_FMA) \ $(LO_CLANG_CXXFLAGS_INTRINSICS_AVX2) $(LO_CLANG_CXXFLAGS_INTRINSICS_F16C) $(LO_CLANG_CXXFLAGS_INTRINSICS_FMA) \ $(LO_SKIA_AVOID_INLINE_COPIES) \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/opts/SkOpts_ssse3, $(CXXFLAGS_INTRINSICS_SSSE3) $(LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3) \ $(LO_SKIA_AVOID_INLINE_COPIES) \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/opts/SkOpts_skx, $(CXXFLAGS_INTRINSICS_AVX512) $(LO_CLANG_CXXFLAGS_INTRINSICS_AVX512)\ $(LO_SKIA_AVOID_INLINE_COPIES) \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/tools/sk_app/WindowContext \ )) ifeq ($(OS),WNT) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/ports/SkDebug_win \ UnpackedTarball/skia/src/ports/SkFontHost_win \ UnpackedTarball/skia/src/fonts/SkFontMgr_indirect \ @@ -958,18 +957,18 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/utils/win/SkIStream \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/tools/sk_app/win/RasterWindowContext_win \ )) ifeq ($(SKIA_GPU),VULKAN) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/tools/sk_app/win/VulkanWindowContext_win \ )) endif else ifeq ($(OS),MACOSX) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/ports/SkDebug_stdio \ UnpackedTarball/skia/src/ports/SkImageGeneratorCG \ UnpackedTarball/skia/src/ports/SkFontMgr_mac_ct \ @@ -983,7 +982,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ )) ifeq ($(SKIA_GPU),METAL) -$(eval $(call gb_Library_add_generated_objcxxobjects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_objcxxobjects,skia,\ UnpackedTarball/skia/tools/sk_app/MetalWindowContext \ UnpackedTarball/skia/tools/sk_app/mac/MetalWindowContext_mac \ UnpackedTarball/skia/tools/sk_app/mac/WindowContextFactory_mac \ @@ -991,7 +990,7 @@ $(eval $(call gb_Library_add_generated_objcxxobjects,skia,\ # Not used, uses OpenGL - UnpackedTarball/skia/tools/sk_app/mac/RasterWindowContext_mac -$(eval $(call gb_Library_add_generated_objcxxobjects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_objcxxobjects,skia,\ UnpackedTarball/skia/src/gpu/ganesh/mtl/GrMtlAttachment \ UnpackedTarball/skia/src/gpu/ganesh/mtl/GrMtlBuffer \ UnpackedTarball/skia/src/gpu/ganesh/mtl/GrMtlCaps \ @@ -1021,7 +1020,7 @@ $(eval $(call gb_Library_add_generated_objcxxobjects,skia,\ endif else -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/ports/SkDebug_stdio \ UnpackedTarball/skia/src/ports/SkFontConfigInterface \ UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct \ @@ -1035,11 +1034,11 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/ports/SkOSLibrary_posix \ )) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/tools/sk_app/unix/RasterWindowContext_unix \ )) ifeq ($(SKIA_GPU),VULKAN) -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/tools/sk_app/unix/VulkanWindowContext_unix \ )) endif @@ -1049,7 +1048,7 @@ endif # Skcms code is used by png writer, which is used by SkiaHelper::dump(). Building # this without optimizations would mean having each pixel of saved images be # processed by unoptimized code. -$(eval $(call gb_Library_add_generated_exception_objects,skia,\ +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,skia,\ UnpackedTarball/skia/modules/skcms/skcms, $(gb_COMPILEROPTFLAGS) \ )) diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk index 60445c28efbe..b95362744722 100644 --- a/solenv/gbuild/PrecompiledHeaders.mk +++ b/solenv/gbuild/PrecompiledHeaders.mk @@ -153,7 +153,6 @@ gb_PrecompiledHeader_ignore_flags_system := \ -DCPPUNIT_PLUGIN_EXPORT='extern "C" SAL_DLLPUBLIC_EXPORT' \ -DOOO_DLLIMPLEMENTATION_TEST \ -DSK_USER_CONFIG_HEADER=% \ --DSKIA_DLL \ -DGLM_FORCE_CTOR_INIT \ -DVCL_INTERNALS \ -DZLIB_CONST \ diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index 2d314017bb8b..49f0bbf4b2ac 100644 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -63,6 +63,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\ Xrender \ $(if $(filter SKIA,$(BUILD_TYPE)), \ skia \ + libpng \ fontconfig \ ) \ )) @@ -72,6 +73,9 @@ $(eval $(call gb_Library_add_libs,vclplug_gen,\ -lXext \ -lSM \ -lICE \ + $(if $(filter SKIA,$(BUILD_TYPE)), \ + -lX11-xcb \ + ) \ )) $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\ diff --git a/vcl/Library_vclplug_osx.mk b/vcl/Library_vclplug_osx.mk index 0545af8dd33a..82c4928dddb1 100644 --- a/vcl/Library_vclplug_osx.mk +++ b/vcl/Library_vclplug_osx.mk @@ -65,6 +65,7 @@ $(eval $(call gb_Library_use_externals,vclplug_osx,\ harfbuzz \ $(if $(filter SKIA,$(BUILD_TYPE)), \ skia \ + libpng \ ) \ )) @@ -154,6 +155,10 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,vclplug_osx,\ Cocoa \ Carbon \ CoreFoundation \ + $(if $(filter SKIA,$(BUILD_TYPE)), \ + QuartzCore \ + Metal \ + ) \ )) ifneq ($(ENABLE_MACOSX_SANDBOX),TRUE) diff --git a/vcl/Library_vclplug_win.mk b/vcl/Library_vclplug_win.mk index d4656302d4ce..8a5ced42ee45 100644 --- a/vcl/Library_vclplug_win.mk +++ b/vcl/Library_vclplug_win.mk @@ -61,7 +61,10 @@ $(eval $(call gb_Library_use_externals,vclplug_win,\ boost_headers \ epoxy \ harfbuzz \ - $(if $(filter SKIA,$(BUILD_TYPE)),skia) \ + $(if $(filter SKIA,$(BUILD_TYPE)), \ + skia \ + libpng \ + ) \ )) $(eval $(call gb_Library_add_exception_objects,vclplug_win,\ @@ -115,6 +118,9 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_win,\ )) $(eval $(call gb_Library_use_system_win32_libs,vclplug_win,\ + $(if $(filter SKIA,$(BUILD_TYPE)), \ + usp10 \ + ) \ advapi32 \ d2d1 \ dwmapi \ |