Skip to content

Conversation

matejk
Copy link
Contributor

@matejk matejk commented Aug 11, 2025

Closes #4358.

Source code of external libraries is moved to subdirectory dependencies where each of the libraries has its own subdirectory.

When creating a bundled build, a static library is created and then linked where appropriate. For unbundled builds system provided library is linked.

This mechanism allows cleaner separation of Poco and other code, easier upgrade and the possibility to have fine-grained bundled options per external library.

@matejk matejk requested review from obiltschnig and aleks-f August 11, 2025 17:40
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from d8caa21 to 3413c1c Compare August 12, 2025 07:17
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from e9586e6 to 9bb3cdf Compare August 12, 2025 12:54
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from b1c4e4d to 94538ea Compare August 13, 2025 11:06
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from 94538ea to c34d433 Compare August 13, 2025 11:08
@matejk matejk force-pushed the 4358-reorganise-external-libs branch 4 times, most recently from 1f69e89 to 2294324 Compare August 13, 2025 13:10
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from 88dfe8f to 3dcc0b7 Compare August 14, 2025 10:26
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from bdea5f3 to 15ab4cb Compare August 14, 2025 11:13
@matejk matejk force-pushed the 4358-reorganise-external-libs branch 3 times, most recently from 8ee234c to a14ac2e Compare August 14, 2025 13:38
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from a14ac2e to f741f2c Compare August 15, 2025 09:17
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from febe8f5 to 6b25b03 Compare August 15, 2025 13:42
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from 74f9fc0 to 7180ea8 Compare August 16, 2025 13:03
@matejk
Copy link
Contributor Author

matejk commented Aug 16, 2025

  • External sources moved to dependendies
  • static (object) libraries built and linked to Poco libraries
  • Poco code and CMake files updated
  • Most CI tests converted to build with CMake instead of make/VS
  • fixed a few issues detected with thread sanitizer

if (POCO_UNBUNDLED)
target_link_libraries(_BUNDLED_HPDF PRIVATE PNG::PNG)
else()
target_link_libraries(_BUNDLED_HPDF PRIVATE "$<BUILD_LOCAL_INTERFACE:PNG::PNG>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an alternate solution to the BUILD_LOCAL_INTERFACE generator expression here? I think it would be good if Poco kept the cmake minimum to 3.15, or at least not jumping all the way to 3.26.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not able to find other solution that does not involve writing own custom CMake scripts. And CMake 3.26 is the first version that has clean solution to link private Poco library and not get undefined export errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reorganise source code of external libraries (pre-requisite for #4354)
2 participants