Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Add features to POCO to allow reducing build time #43337

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions ports/poco/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
crypto ENABLE_CRYPTO
netssl ENABLE_NETSSL
pdf ENABLE_PDF
postgresql ENABLE_DATA_POSTGRESQL
activerecord ENABLE_ACTIVERECORD
cppparser ENABLE_CPPPARSER
crypto ENABLE_CRYPTO
mongodb ENABLE_MONGODB
netssl ENABLE_NETSSL
pdf ENABLE_PDF
pocodoc ENABLE_POCODOC
postgresql ENABLE_DATA_POSTGRESQL
sqlite3 ENABLE_DATA_SQLITE
)

# POCO_ENABLE_NETSSL_WIN:
Expand All @@ -60,18 +65,16 @@ vcpkg_cmake_configure(
-DPOCO_MT=${POCO_MT}
-DENABLE_TESTS=OFF
# Allow enabling and disabling components
-DENABLE_ACTIVERECORD_COMPILER=${ENABLE_ACTIVERECORD}
-DENABLE_ENCODINGS=ON
-DENABLE_ENCODINGS_COMPILER=ON
-DENABLE_XML=ON
-DENABLE_JSON=ON
-DENABLE_MONGODB=ON
-DENABLE_REDIS=ON
-DENABLE_UTIL=ON
-DENABLE_NET=ON
-DENABLE_SEVENZIP=ON
-DENABLE_ZIP=ON
-DENABLE_CPPPARSER=ON
-DENABLE_POCODOC=ON
-DENABLE_PAGECOMPILER=ON
-DENABLE_PAGECOMPILER_FILE2PAGE=ON
-DPOCO_DISABLE_INTERNAL_OPENSSL=ON
Expand All @@ -87,7 +90,14 @@ vcpkg_cmake_install()
vcpkg_copy_pdbs()

# Move apps to the tools folder
vcpkg_copy_tools(TOOL_NAMES cpspc f2cpsp PocoDoc tec poco-arc AUTO_CLEAN)
vcpkg_copy_tools(TOOL_NAMES cpspc f2cpsp tec AUTO_CLEAN)
if (ENABLE_ACTIVERECORD STREQUAL "ON")
vcpkg_copy_tools(TOOL_NAMES poco-arc AUTO_CLEAN)
endif()
if (ENABLE_POCODOC STREQUAL "ON")
vcpkg_copy_tools(TOOL_NAMES PocoDoc AUTO_CLEAN)
endif()


if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
Expand Down
26 changes: 25 additions & 1 deletion ports/poco/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"dependencies": [
"expat",
"pcre2",
"sqlite3",
"utf8proc",
{
"name": "vcpkg-cmake",
Expand All @@ -21,7 +20,20 @@
},
"zlib"
],
"default-features": [
"activerecord",
"cppparser",
"mongodb",
"pocodoc",
"sqlite3"
],
"features": {
"activerecord": {
"description": "ActiveRecord support for POCO"
},
"cppparser": {
"description": "C++ parser support for POCO"
},
"crypto": {
"description": "Crypto support",
"dependencies": [
Expand All @@ -34,6 +46,9 @@
"libmariadb"
]
},
"mongodb": {
"description": "MongoDB support for POCO"
},
"mysql": {
"description": "Mysql support for POCO",
"dependencies": [
Expand Down Expand Up @@ -61,11 +76,20 @@
"libharu"
]
},
"pocodoc": {
"description": "PocoDoc tool support"
},
"postgresql": {
"description": "PostgreSQL support for POCO",
"dependencies": [
"libpqxx"
]
},
"sqlite3": {
"description": "sqlite3 support for POCO",
"dependencies": [
"sqlite3"
]
}
}
}
Loading