Skip to content

Commit ab2b7ad

Browse files
committed
Update to latest dpf
Signed-off-by: falkTX <[email protected]>
1 parent 3858414 commit ab2b7ad

File tree

103 files changed

+4732
-3213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4732
-3213
lines changed

dpf/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: ISC
66

7-
cmake_minimum_required(VERSION 3.8)
7+
cmake_minimum_required(VERSION 3.8...3.31)
88

99
project(DPF)
1010

@@ -30,7 +30,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
3030
include(DPF-plugin)
3131

3232
if(DPF_LIBRARIES)
33-
find_package(PkgConfig)
33+
find_package(PkgConfig QUIET)
3434
if(PKG_CONFIG_FOUND)
3535
pkg_check_modules(CAIRO "cairo")
3636
if(CAIRO_FOUND AND (NOT HAIKU))
@@ -42,7 +42,7 @@ if(DPF_LIBRARIES)
4242
endif()
4343

4444
if(DPF_EXAMPLES)
45-
find_package(PkgConfig)
45+
find_package(PkgConfig QUIET)
4646
if(PKG_CONFIG_FOUND)
4747
pkg_check_modules(CAIRO "cairo")
4848
if(CAIRO_FOUND AND (NOT HAIKU))

dpf/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2012-2024 Filipe Coelho <[email protected]>
1+
Copyright (C) 2012-2025 Filipe Coelho <[email protected]>
22

33
Permission to use, copy, modify, and/or distribute this software for any
44
purpose with or without fee is hereby granted, provided that the above

dpf/Makefile.base.mk

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,14 @@
2020
# Tweak `nvgTextBreakLines` to allow space characters
2121
# FIXME proper details
2222

23-
# NVG_FONT_TEXTURE_FLAGS=0
24-
# FILE_BROWSER_DISABLED=true
25-
# WINDOWS_ICON_ID=0
26-
# USE_GLES2=true
27-
# USE_GLES3=true
28-
# USE_OPENGL3=true
29-
# USE_NANOVG_FBO=true
30-
# USE_NANOVG_FREETYPE=true
23+
# NVG_FONT_TEXTURE_FLAGS=
24+
# WINDOWS_ICON_ID=
25+
# USE_NANOVG_FBO=false
26+
# USE_NANOVG_FREETYPE=false
3127
# USE_FILE_BROWSER=true
32-
# USE_WEB_VIEW=true
28+
# USE_GLES2=false
29+
# USE_GLES3=false
30+
# USE_WEB_VIEW=false
3331

3432
# STATIC_BUILD=true
3533
# Tweak build to be able to generate fully static builds (e.g. skip use of libdl)
@@ -333,6 +331,10 @@ BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
333331
CXXFLAGS += -fvisibility-inlines-hidden
334332
endif
335333

334+
ifeq ($(WASM),true)
335+
LINK_OPTS += -sALLOW_MEMORY_GROWTH
336+
endif
337+
336338
ifeq ($(WITH_LTO),true)
337339
BASE_FLAGS += -fno-strict-aliasing -flto
338340
LINK_OPTS += -fno-strict-aliasing -flto -Werror=odr
@@ -469,7 +471,7 @@ endif
469471
else ifeq ($(WASM),true)
470472

471473
# wasm builds cannot work using regular desktop OpenGL
472-
ifeq (,$(USE_GLES2)$(USE_GLES3))
474+
ifeq (,$(findstring true,$(USE_GLES2)$(USE_GLES3)))
473475
USE_GLES2 = true
474476
endif
475477

@@ -486,12 +488,10 @@ endif
486488

487489
else
488490

489-
ifneq ($(FILE_BROWSER_DISABLED),true)
490-
ifeq ($(HAVE_DBUS),true)
491+
ifeq ($(USE_FILE_BROWSER)$(HAVE_DBUS),truetrue)
491492
DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags dbus-1) -DHAVE_DBUS
492493
DGL_SYSTEM_LIBS += $(shell $(PKG_CONFIG) --libs dbus-1)
493494
endif
494-
endif
495495

496496
ifeq ($(HAVE_X11),true)
497497
DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags x11) -DHAVE_X11
@@ -544,14 +544,16 @@ else ifeq ($(MACOS),true)
544544
OPENGL_FLAGS = -DGL_SILENCE_DEPRECATION=1 -Wno-deprecated-declarations
545545
OPENGL_LIBS = -framework OpenGL
546546
else ifeq ($(WASM),true)
547-
ifeq ($(USE_GLES2),true)
547+
OPENGL_FLAGS =
548+
ifeq ($(USE_GLES3),true)
549+
OPENGL_LIBS = -sMIN_WEBGL_VERSION=3 -sMAX_WEBGL_VERSION=3
550+
else ifeq ($(USE_GLES2),true)
548551
OPENGL_LIBS = -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2
549552
else
550-
ifneq ($(USE_GLES3),true)
551-
OPENGL_LIBS = -sLEGACY_GL_EMULATION -sGL_UNSAFE_OPTS=0
552-
endif
553+
OPENGL_LIBS = -sLEGACY_GL_EMULATION -sGL_UNSAFE_OPTS=0
553554
endif
554555
else ifeq ($(WINDOWS),true)
556+
OPENGL_FLAGS =
555557
OPENGL_LIBS = -lopengl32
556558
else
557559
OPENGL_FLAGS = $(shell $(PKG_CONFIG) --cflags gl x11)
@@ -581,7 +583,7 @@ DGL_FLAGS += -DHAVE_VULKAN
581583
VULKAN_FLAGS = $(shell $(PKG_CONFIG) --cflags vulkan)
582584
VULKAN_LIBS = $(shell $(PKG_CONFIG) --libs vulkan)
583585

584-
ifneq ($(WINDOWS),true)
586+
ifneq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
585587
VULKAN_LIBS += -ldl
586588
endif
587589

@@ -666,13 +668,9 @@ endif
666668

667669
ifeq ($(USE_GLES2),true)
668670
BUILD_CXX_FLAGS += -DDGL_USE_OPENGL3 -DDGL_USE_GLES -DDGL_USE_GLES2
669-
endif
670-
671-
ifeq ($(USE_GLES3),true)
671+
else ifeq ($(USE_GLES3),true)
672672
BUILD_CXX_FLAGS += -DDGL_USE_OPENGL3 -DDGL_USE_GLES -DDGL_USE_GLES3
673-
endif
674-
675-
ifeq ($(USE_OPENGL3),true)
673+
else ifeq ($(USE_OPENGL3),true)
676674
BUILD_CXX_FLAGS += -DDGL_USE_OPENGL3
677675
endif
678676

@@ -700,7 +698,7 @@ endif
700698
# Set app extension
701699

702700
ifeq ($(WASM),true)
703-
APP_EXT = .html
701+
APP_EXT = .js
704702
else ifeq ($(WINDOWS),true)
705703
APP_EXT = .exe
706704
endif

0 commit comments

Comments
 (0)