2017-11-30 05:12:11 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O p o c o p r o j e c t / p o c o
2024-03-05 18:26:47 +08:00
R E F " p o c o - $ { V E R S I O N } - r e l e a s e "
2024-04-09 23:24:54 +08:00
S H A 5 1 2 0 8 4 0 6 4 f b 4 6 2 c 9 e 7 9 9 3 d 0 6 9 e b d f 3 9 5 8 0 2 a f 9 0 0 e d 9 2 c 5 b 2 9 4 4 6 5 a 2 c 2 4 6 1 6 2 b b 8 6 c a a 3 5 0 5 9 8 5 d e 3 2 9 e 8 1 1 0 d 3 e 9 f b 3 b c 3 9 a e 9 5 3 6 d 5 2 3 8 4 3 7 2 9 d 4 e d 5 c e 0 0 c 3 5 2 8 9 d 9 2
2024-01-25 03:31:46 +08:00
H E A D _ R E F d e v e l
2016-11-16 15:10:40 +08:00
P A T C H E S
2019-03-09 08:18:22 +08:00
# Fix embedded copy of pcre in static linking mode
2022-11-01 04:13:06 +08:00
0 0 0 1 - s t a t i c - p c r e . p a t c h
2019-04-24 05:01:23 +08:00
# Add the support of arm64-windows
2022-11-01 04:13:06 +08:00
0 0 0 2 - a r m 6 4 - p c r e . p a t c h
0 0 0 3 - f i x - d e p e n d e n c y . p a t c h
0 0 0 4 - f i x - f e a t u r e - s q l i t e 3 . p a t c h
0 0 0 5 - f i x - e r r o r - c 3 8 6 1 . p a t c h
0 0 0 7 - f i n d - p c r e 2 . p a t c h
2024-11-26 04:46:08 +08:00
# MSYS2 repo was used as a source. Thanks MSYS2 team: https://github.com/msys2/MINGW-packages/blob/6e7fba42b7f50e1111b7c0ef50048832243b0ac4/mingw-w64-poco/001-fix-build-on-mingw.patch
0 0 0 8 - f i x - m i n g w - c o m p i l a t i o n . p a t c h
2016-11-16 15:10:40 +08:00
)
2022-11-01 04:13:06 +08:00
file ( REMOVE "${SOURCE_PATH}/Foundation/src/pcre2.h" )
2020-10-27 14:11:26 +08:00
file ( REMOVE "${SOURCE_PATH}/cmake/V39/FindEXPAT.cmake" )
file ( REMOVE "${SOURCE_PATH}/cmake/V313/FindSQLite3.cmake" )
2022-11-01 04:13:06 +08:00
# vcpkg's PCRE2 does not provide a FindPCRE2, and the bundled one seems to work fine
# file(REMOVE "${SOURCE_PATH}/cmake/FindPCRE2.cmake")
2021-08-03 07:57:14 +08:00
file ( REMOVE "${SOURCE_PATH}/XML/src/expat_config.h" )
2020-11-14 05:35:03 +08:00
file ( REMOVE "${SOURCE_PATH}/cmake/FindMySQL.cmake" )
2020-10-27 14:11:26 +08:00
2019-03-09 08:18:22 +08:00
# define Poco linkage type
2018-05-01 06:53:00 +08:00
string ( COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT )
2017-11-01 16:27:12 +08:00
2019-08-28 05:23:02 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2021-08-03 07:57:14 +08:00
F E A T U R E S
2023-03-04 03:50:00 +08:00
c r y p t o E N A B L E _ C R Y P T O
n e t s s l E N A B L E _ N E T S S L
2021-08-03 07:57:14 +08:00
p d f E N A B L E _ P D F
s q l i t e 3 E N A B L E _ D A T A _ S Q L I T E
p o s t g r e s q l E N A B L E _ D A T A _ P O S T G R E S Q L
2019-08-28 05:23:02 +08:00
)
2023-03-04 03:50:00 +08:00
# POCO_ENABLE_NETSSL_WIN:
# Use the unreleased NetSSL_Win module instead of (OpenSSL) NetSSL.
# This is a variable which can be set in the triplet file.
if ( POCO_ENABLE_NETSSL_WIN )
string ( REPLACE "ENABLE_NETSSL" "ENABLE_NETSSL_WIN" FEATURE_OPTIONS "${FEATURE_OPTIONS}" )
list ( APPEND FEATURE_OPTIONS "-DENABLE_NETSSL:BOOL=OFF" )
2022-11-11 00:23:12 +08:00
endif ( )
2020-11-14 05:35:03 +08:00
if ( "mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES )
set ( POCO_USE_MYSQL ON )
else ( )
set ( POCO_USE_MYSQL OFF )
2016-11-17 16:35:33 +08:00
endif ( )
2021-08-03 07:57:14 +08:00
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2022-11-11 00:23:12 +08:00
O P T I O N S
$ { F E A T U R E _ O P T I O N S }
2020-11-14 05:35:03 +08:00
# force to use dependencies as external
2019-03-09 08:18:22 +08:00
- D P O C O _ U N B U N D L E D = O N
# Define linking feature
2018-05-01 06:53:00 +08:00
- D P O C O _ M T = $ { P O C O _ M T }
2019-08-15 15:18:42 +08:00
- D E N A B L E _ T E S T S = O F F
2019-03-09 08:18:22 +08:00
# Allow enabling and disabling components
2019-08-15 15:18:42 +08:00
- D E N A B L E _ E N C O D I N G S = O N
- D E N A B L E _ E N C O D I N G S _ C O M P I L E R = O N
- D E N A B L E _ X M L = O N
- D E N A B L E _ J S O N = O N
- D E N A B L E _ M O N G O D B = O N
- D E N A B L E _ R E D I S = O N
- D E N A B L E _ U T I L = O N
- D E N A B L E _ N E T = O N
- D E N A B L E _ S E V E N Z I P = O N
- D E N A B L E _ Z I P = O N
- D E N A B L E _ C P P P A R S E R = O N
- D E N A B L E _ P O C O D O C = O N
- D E N A B L E _ P A G E C O M P I L E R = O N
- D E N A B L E _ P A G E C O M P I L E R _ F I L E 2 P A G E = O N
2020-11-14 05:35:03 +08:00
- D P O C O _ D I S A B L E _ I N T E R N A L _ O P E N S S L = O N
- D E N A B L E _ A P A C H E C O N N E C T O R = O F F
- D E N A B L E _ D A T A _ M Y S Q L = $ { P O C O _ U S E _ M Y S Q L }
2022-11-01 04:13:06 +08:00
M A Y B E _ U N U S E D _ V A R I A B L E S # these are only used when if(MSVC)
P O C O _ D I S A B L E _ I N T E R N A L _ O P E N S S L
P O C O _ M T
2016-11-16 15:10:40 +08:00
)
2021-08-03 07:57:14 +08:00
vcpkg_cmake_install ( )
2016-11-16 15:10:40 +08:00
2020-11-14 05:35:03 +08:00
vcpkg_copy_pdbs ( )
# Move apps to the tools folder
2024-01-25 03:31:46 +08:00
vcpkg_copy_tools ( TOOL_NAMES cpspc f2cpsp PocoDoc tec poco-arc AUTO_CLEAN )
2020-11-14 05:35:03 +08:00
2022-11-01 04:13:06 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" )
endif ( )
2019-03-09 08:18:22 +08:00
# Copy additional include files not part of any libraries
if ( EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL" )
2021-12-23 11:53:44 +08:00
file ( COPY "${SOURCE_PATH}/Data/include" DESTINATION "${CURRENT_PACKAGES_DIR}" )
2019-03-09 08:18:22 +08:00
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/MySQL" )
2021-12-23 11:53:44 +08:00
file ( COPY "${SOURCE_PATH}/Data/MySQL/include" DESTINATION "${CURRENT_PACKAGES_DIR}" )
2019-03-09 08:18:22 +08:00
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/ODBC" )
2021-12-23 11:53:44 +08:00
file ( COPY "${SOURCE_PATH}/Data/ODBC/include" DESTINATION "${CURRENT_PACKAGES_DIR}" )
2019-03-09 08:18:22 +08:00
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/PostgreSQL" )
2021-12-23 11:53:44 +08:00
file ( COPY "${SOURCE_PATH}/Data/PostgreSQL/include" DESTINATION "${CURRENT_PACKAGES_DIR}" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/libpq" )
2019-03-09 08:18:22 +08:00
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/SQLite" )
2021-12-23 11:53:44 +08:00
file ( COPY "${SOURCE_PATH}/Data/SQLite/include" DESTINATION "${CURRENT_PACKAGES_DIR}" )
2019-03-09 08:18:22 +08:00
endif ( )
2020-11-14 05:35:03 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
2021-08-03 07:57:14 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH cmake )
2020-11-14 05:35:03 +08:00
else ( )
2021-08-03 07:57:14 +08:00
vcpkg_cmake_config_fixup ( CONFIG_PATH lib/cmake/Poco )
2019-03-09 08:18:22 +08:00
endif ( )
2021-08-03 07:57:14 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
2022-11-10 03:03:26 +08:00
file ( COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
2023-11-06 00:58:57 +08:00
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE" )