Skip to content

Build: Move external libraries to dependencies/ subdirectory#4996

Merged
matejk merged 52 commits intomainfrom
4358-reorganise-external-libs
Sep 11, 2025
Merged

Build: Move external libraries to dependencies/ subdirectory#4996
matejk merged 52 commits intomainfrom
4358-reorganise-external-libs

Conversation

@matejk
Copy link
Copy Markdown
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 aleks-f and obiltschnig August 11, 2025 17:40
@matejk matejk force-pushed the 4358-reorganise-external-libs branch 18 times, most recently from 74f9fc0 to 7180ea8 Compare August 16, 2025 13:03
@matejk
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@matejk matejk force-pushed the 4358-reorganise-external-libs branch from 7180ea8 to 45d697d Compare September 6, 2025 12:59
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from a9d28c6 to fd0355f Compare September 7, 2025 19:56
@matejk matejk force-pushed the 4358-reorganise-external-libs branch 6 times, most recently from 408b829 to ee88bae Compare September 8, 2025 11:57
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from ee88bae to fd09da1 Compare September 8, 2025 12:09
@matejk matejk marked this pull request as ready for review September 8, 2025 15:20
@matejk
Copy link
Copy Markdown
Contributor Author

matejk commented Sep 8, 2025

Replaced all Make and VS jobs in the CI with CMake.

PR is ready to be merged.

@matejk matejk added this to the Release 1.15.0 milestone Sep 8, 2025
@matejk matejk force-pushed the 4358-reorganise-external-libs branch from 318f7da to f5bcb66 Compare September 11, 2025 12:16
@matejk matejk merged commit 7a23a03 into main Sep 11, 2025
74 checks passed
@matejk matejk deleted the 4358-reorganise-external-libs branch September 11, 2025 15:11
matejk added a commit that referenced this pull request Oct 9, 2025
* chore(v8_double_conversion): Move files from Foundation to dependencies.
@matejk matejk changed the title Reorganise external libs to separate subdirectory Build: Move external libraries to dependencies/ subdirectory Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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