From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 1/2] package/poco: convert to CMake package
Date: Sun, 13 Sep 2026 11:04:43 +0200 [thread overview]
Message-ID: <20260913090444.5862-1-bernd@kuhls.net> (raw)
From: Yegor Yefremov <yegorslists@googlemail.com>
Currently when building with make, the cmake config files are not
generated. This leads to problems when integrating the package in an
application built with cmake.
The CMake build system links the PDF component against the system
libpng when POCO_UNBUNDLED is enabled, while the legacy make build
system always used the bundled copy, so select libpng for the PDF
component.
POCO_NO_FPENVIRONMENT and POCO_NO_WSTRING are plain preprocessor
defines rather than CMake options, so pass them through CMAKE_CXX_FLAGS.
Poco is built as a set of shared libraries, so -latomic has to be
passed via CMAKE_SHARED_LINKER_FLAGS as well.
Disable File2Page along with PageCompiler, and tie the ActiveRecord
compiler to the ActiveRecord component, to match what the legacy make
build system omitted.
This patch is based on this one:
https://lists.buildroot.org/pipermail/buildroot/2026-April/801019.html
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
This patch was added unchanged from
https://patchwork.buildroot.org/project/buildroot/patch/20260911103653.431685-1-yegorslists@gmail.com/
package/poco/Config.in | 1 +
package/poco/poco.mk | 98 +++++++++++++++++-------------------------
2 files changed, 40 insertions(+), 59 deletions(-)
diff --git a/package/poco/Config.in b/package/poco/Config.in
index 4801b36a24..b0eeaa1dd8 100644
--- a/package/poco/Config.in
+++ b/package/poco/Config.in
@@ -94,6 +94,7 @@ config BR2_PACKAGE_POCO_NETSSL_OPENSSL
config BR2_PACKAGE_POCO_PDF
bool "PDF"
+ select BR2_PACKAGE_LIBPNG
select BR2_PACKAGE_POCO_JSON
select BR2_PACKAGE_POCO_UTIL
select BR2_PACKAGE_POCO_XML
diff --git a/package/poco/poco.mk b/package/poco/poco.mk
index 40dcc1c502..63279d530e 100644
--- a/package/poco/poco.mk
+++ b/package/poco/poco.mk
@@ -22,80 +22,60 @@ POCO_DEPENDENCIES = \
$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),sqlite) \
$(if $(BR2_PACKAGE_POCO_DATA_PGSQL),postgresql) \
$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),openssl) \
+ $(if $(BR2_PACKAGE_POCO_PDF),libpng) \
$(if $(BR2_PACKAGE_POCO_XML),expat)
-POCO_OMIT = \
- Data/ODBC \
- PageCompiler \
- $(if $(BR2_PACKAGE_POCO_ACTIVERECORD),,ActiveRecord) \
- $(if $(BR2_PACKAGE_POCO_CPP_PARSER),,CppParser) \
- $(if $(BR2_PACKAGE_POCO_CRYPTO),,Crypto) \
- $(if $(BR2_PACKAGE_POCO_DATA),,Data) \
- $(if $(BR2_PACKAGE_POCO_DATA_MYSQL),,Data/MySQL) \
- $(if $(BR2_PACKAGE_POCO_DATA_SQLITE),,Data/SQLite) \
- $(if $(BR2_PACKAGE_POCO_DATA_PGSQL),,Data/PostgreSQL) \
- $(if $(BR2_PACKAGE_POCO_JSON),,JSON) \
- $(if $(BR2_PACKAGE_POCO_JWT),,JWT) \
- $(if $(BR2_PACKAGE_POCO_MONGODB),,MongoDB) \
- $(if $(BR2_PACKAGE_POCO_NET),,Net) \
- $(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),,NetSSL_OpenSSL) \
- $(if $(BR2_PACKAGE_POCO_PDF),,PDF) \
- $(if $(BR2_PACKAGE_POCO_PROMETHEUS),,Prometheus) \
- $(if $(BR2_PACKAGE_POCO_REDIS),,Redis) \
- $(if $(BR2_PACKAGE_POCO_UTIL),,Util) \
- $(if $(BR2_PACKAGE_POCO_XML),,XML) \
- $(if $(BR2_PACKAGE_POCO_ZIP),,Zip)
+# PageCompiler and File2Page are code generators that are of no use on
+# the target, and ODBC support is not wired up in Buildroot.
+POCO_CONF_OPTS = \
+ -DENABLE_DATA_ODBC=OFF \
+ -DENABLE_PAGECOMPILER=OFF \
+ -DENABLE_PAGECOMPILER_FILE2PAGE=OFF \
+ -DENABLE_ACTIVERECORD=$(if $(BR2_PACKAGE_POCO_ACTIVERECORD),ON,OFF) \
+ -DENABLE_ACTIVERECORD_COMPILER=$(if $(BR2_PACKAGE_POCO_ACTIVERECORD),ON,OFF) \
+ -DENABLE_CPPPARSER=$(if $(BR2_PACKAGE_POCO_CPP_PARSER),ON,OFF) \
+ -DENABLE_CRYPTO=$(if $(BR2_PACKAGE_POCO_CRYPTO),ON,OFF) \
+ -DENABLE_DATA=$(if $(BR2_PACKAGE_POCO_DATA),ON,OFF) \
+ -DENABLE_DATA_MYSQL=$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),ON,OFF) \
+ -DENABLE_DATA_SQLITE=$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),ON,OFF) \
+ -DENABLE_DATA_POSTGRESQL=$(if $(BR2_PACKAGE_POCO_DATA_PGSQL),ON,OFF) \
+ -DENABLE_JSON=$(if $(BR2_PACKAGE_POCO_JSON),ON,OFF) \
+ -DENABLE_JWT=$(if $(BR2_PACKAGE_POCO_JWT),ON,OFF) \
+ -DENABLE_MONGODB=$(if $(BR2_PACKAGE_POCO_MONGODB),ON,OFF) \
+ -DENABLE_NET=$(if $(BR2_PACKAGE_POCO_NET),ON,OFF) \
+ -DENABLE_NETSSL=$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),ON,OFF) \
+ -DENABLE_PDF=$(if $(BR2_PACKAGE_POCO_PDF),ON,OFF) \
+ -DENABLE_PROMETHEUS=$(if $(BR2_PACKAGE_POCO_PROMETHEUS),ON,OFF) \
+ -DENABLE_REDIS=$(if $(BR2_PACKAGE_POCO_REDIS),ON,OFF) \
+ -DENABLE_UTIL=$(if $(BR2_PACKAGE_POCO_UTIL),ON,OFF) \
+ -DENABLE_XML=$(if $(BR2_PACKAGE_POCO_XML),ON,OFF) \
+ -DENABLE_ZIP=$(if $(BR2_PACKAGE_POCO_ZIP),ON,OFF) \
+ -DPOCO_UNBUNDLED=ON
+
+# POCO_NO_FPENVIRONMENT and POCO_NO_WSTRING are plain preprocessor
+# defines, not CMake options, so they have to be passed as compiler flags.
+POCO_CXXFLAGS = $(TARGET_CXXFLAGS)
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
-POCO_CONF_OPTS += --no-fpenvironment --no-wstring
+POCO_CXXFLAGS += -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING
endif
# architectures missing some FE_* in their fenv.h
ifeq ($(BR2_sh4a),y)
-POCO_CONF_OPTS += --no-fpenvironment
+POCO_CXXFLAGS += -DPOCO_NO_FPENVIRONMENT
endif
# disable fpenvironment for soft floating point configuration
ifeq ($(BR2_SOFT_FLOAT),y)
-POCO_CONF_OPTS += --no-fpenvironment
+POCO_CXXFLAGS += -DPOCO_NO_FPENVIRONMENT
endif
-POCO_MAKE_TARGET = shared_release
+POCO_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(POCO_CXXFLAGS)"
-POCO_LDFLAGS=$(TARGET_LDFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-POCO_LDFLAGS += -latomic
+POCO_CONF_OPTS += \
+ -DCMAKE_EXE_LINKER_FLAGS=-latomic \
+ -DCMAKE_SHARED_LINKER_FLAGS=-latomic
endif
-define POCO_CONFIGURE_CMDS
- (cd $(@D); $(TARGET_MAKE_ENV) ./configure \
- --config=Linux \
- --prefix=/usr \
- --ldflags="$(POCO_LDFLAGS)" \
- --omit="$(POCO_OMIT)" \
- $(POCO_CONF_OPTS) \
- --unbundled \
- --no-tests \
- --no-samples)
-endef
-
-define POCO_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) POCO_TARGET_OSARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) \
- POCO_MYSQL_INCLUDE=$(STAGING_DIR)/usr/include/mysql \
- POCO_MYSQL_LIB=$(STAGING_DIR)/usr/lib/mysql \
- POCO_PGSQL_INCLUDE=$(STAGING_DIR)/usr/include/postgresql \
- POCO_PGSQL_LIB=$(STAGING_DIR)/usr/lib/postgresql \
- DEFAULT_TARGET=$(POCO_MAKE_TARGET) -C $(@D)
-endef
-
-define POCO_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) \
- DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D)
-endef
-
-define POCO_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) \
- DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D)
-endef
-
-$(eval $(generic-package))
+$(eval $(cmake-package))
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-09-13 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 9:04 Bernd Kuhls [this message]
2026-09-13 9:04 ` [Buildroot] [PATCH 2/2] package/poco: bump version to 1.15.3 Bernd Kuhls
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260913090444.5862-1-bernd@kuhls.net \
--to=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox