mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 05:21:29 +08:00
[poco] Fix dependency, add features (#14305)
* [poco] Fix dependency, add features * [poco] Update libmysql related code * [poco] Drop uwp support, fix cmake path
This commit is contained in:
parent
7837631629
commit
132ca47d69
@ -1,8 +1,10 @@
|
||||
Source: poco
|
||||
Version: 1.10.1
|
||||
Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng
|
||||
Port-Version: 1
|
||||
Build-Depends: expat, pcre, zlib
|
||||
Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.
|
||||
Homepage: https://github.com/pocoproject/poco
|
||||
Supports: !uwp
|
||||
|
||||
Feature: mysql
|
||||
Build-Depends: libmysql
|
||||
@ -16,6 +18,14 @@ Feature: postgresql
|
||||
Build-Depends: libpqxx
|
||||
Description: PostgreSQL support for POCO
|
||||
|
||||
Feature: sqlite3
|
||||
Build-Depends: sqlite3
|
||||
Description: Sqlite3 support for POCO
|
||||
|
||||
Feature: netssl
|
||||
Build-Depends: openssl
|
||||
Description: NetSSL support for POCO
|
||||
|
||||
Feature: pdf
|
||||
Build-Depends: libharu
|
||||
Description: Haru support for POCO
|
||||
Description: Haru support for POCO
|
@ -1,82 +1,182 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b664afd..0d4670e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -457,15 +457,6 @@ install(
|
||||
Devel
|
||||
)
|
||||
|
||||
-if(POCO_UNBUNDLED)
|
||||
- install(FILES cmake/FindPCRE.cmake
|
||||
- DESTINATION "${PocoConfigPackageLocation}")
|
||||
- install(FILES cmake/V39/FindEXPAT.cmake
|
||||
- DESTINATION "${PocoConfigPackageLocation}/V39")
|
||||
- install(FILES cmake/V313/FindSQLite3.cmake
|
||||
- DESTINATION "${PocoConfigPackageLocation}/V313")
|
||||
-endif()
|
||||
-
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
message(STATUS "${PROJECT_NAME} package version: ${PROJECT_VERSION}")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt
|
||||
index b52e2c5..0dcfae2 100644
|
||||
--- a/Data/SQLite/CMakeLists.txt
|
||||
+++ b/Data/SQLite/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- find_package(SQLite3 REQUIRED)
|
||||
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||
else()
|
||||
# sqlite3
|
||||
POCO_SOURCES(SQLITE_SRCS sqlite3
|
||||
@@ -43,7 +43,7 @@ target_include_directories(DataSQLite
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
||||
+ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3)
|
||||
target_compile_definitions(DataSQLite PUBLIC
|
||||
POCO_UNBUNDLED
|
||||
SQLITE_THREADSAFE=1
|
||||
diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt
|
||||
index 4fbf06f..793285a 100644
|
||||
--- a/XML/CMakeLists.txt
|
||||
+++ b/XML/CMakeLists.txt
|
||||
@@ -20,7 +20,7 @@ endif()
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if(POCO_UNBUNDLED)
|
||||
- find_package(EXPAT REQUIRED)
|
||||
+ find_package(expat CONFIG REQUIRED)
|
||||
else()
|
||||
POCO_SOURCES(SRCS expat
|
||||
src/xmlparse.cpp
|
||||
@@ -50,7 +50,7 @@ target_include_directories(XML
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- target_link_libraries(XML PUBLIC EXPAT::EXPAT)
|
||||
+ target_link_libraries(XML PUBLIC expat::expat)
|
||||
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
|
||||
else()
|
||||
if(WIN32)
|
||||
diff --git a/cmake/PocoConfig.cmake.in b/cmake/PocoConfig.cmake.in
|
||||
index 173eacd..589fdb6 100644
|
||||
--- a/cmake/PocoConfig.cmake.in
|
||||
+++ b/cmake/PocoConfig.cmake.in
|
||||
@@ -8,6 +8,13 @@ if (NOT Poco_FIND_COMPONENTS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(ZLIB REQUIRED)
|
||||
+find_dependency(unofficial-pcre REQUIRED)
|
||||
+if(Poco_FIND_REQUIRED_XML)
|
||||
+ find_dependency(EXPAT REQUIRED)
|
||||
+endif()
|
||||
+
|
||||
set(_Poco_FIND_PARTS_REQUIRED)
|
||||
if (Poco_FIND_REQUIRED)
|
||||
set(_Poco_FIND_PARTS_REQUIRED REQUIRED)
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b664afd..0f72521 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -82,8 +82,6 @@ option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF)
|
||||
|
||||
if(ENABLE_CRYPTO OR ENABLE_NETSSL OR ENABLE_JWT)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
-else()
|
||||
- find_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
@@ -113,24 +111,18 @@ else()
|
||||
option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
|
||||
endif()
|
||||
|
||||
-if(ENABLE_DATA_MYSQL)
|
||||
- find_package(MySQL REQUIRED)
|
||||
-else()
|
||||
- find_package(MySQL)
|
||||
-endif()
|
||||
+option(ENABLE_DATA "Enable Data" OFF)
|
||||
+option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
|
||||
|
||||
-if(MYSQL_FOUND)
|
||||
- option(ENABLE_DATA "Enable Data" ON)
|
||||
- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON)
|
||||
-else()
|
||||
- option(ENABLE_DATA "Enable Data" OFF)
|
||||
- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
|
||||
+if(ENABLE_DATA_MYSQL)
|
||||
+ find_package(libmysql)
|
||||
+ if (NOT libmysql_FOUND)
|
||||
+ find_package(unofficial-libmariadb CONFIG REQUIRED)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_DATA_POSTGRESQL)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
-else()
|
||||
- find_package(PostgreSQL)
|
||||
endif()
|
||||
|
||||
if(PostgreSQL_FOUND)
|
||||
@@ -200,6 +192,9 @@ include(DefinePlatformSpecifc)
|
||||
# Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file
|
||||
set(Poco_COMPONENTS "")
|
||||
|
||||
+# Do not declare the link library in the code!
|
||||
+add_definitions(-DPOCO_NO_AUTOMATIC_LIBS)
|
||||
+
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(CppUnit)
|
||||
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
|
||||
@@ -327,8 +322,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
||||
list(APPEND Poco_COMPONENTS "Redis")
|
||||
endif()
|
||||
|
||||
-if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
||||
- add_subdirectory(PDF)
|
||||
+if(ENABLE_PDF)
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+ find_library(PocoPDF_LIBRARY_RELEASE NAMES libhpdf)
|
||||
+ find_library(PocoPDF_LIBRARY_DEBUG NAMES libhpdfd)
|
||||
+ select_library_configurations(PocoPDF)
|
||||
list(APPEND Poco_COMPONENTS "PDF")
|
||||
endif()
|
||||
|
||||
@@ -457,15 +455,6 @@ install(
|
||||
Devel
|
||||
)
|
||||
|
||||
-if(POCO_UNBUNDLED)
|
||||
- install(FILES cmake/FindPCRE.cmake
|
||||
- DESTINATION "${PocoConfigPackageLocation}")
|
||||
- install(FILES cmake/V39/FindEXPAT.cmake
|
||||
- DESTINATION "${PocoConfigPackageLocation}/V39")
|
||||
- install(FILES cmake/V313/FindSQLite3.cmake
|
||||
- DESTINATION "${PocoConfigPackageLocation}/V313")
|
||||
-endif()
|
||||
-
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
message(STATUS "${PROJECT_NAME} package version: ${PROJECT_VERSION}")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
diff --git a/Data/MySQL/CMakeLists.txt b/Data/MySQL/CMakeLists.txt
|
||||
index f71b145..c3eaf9e 100644
|
||||
--- a/Data/MySQL/CMakeLists.txt
|
||||
+++ b/Data/MySQL/CMakeLists.txt
|
||||
@@ -21,7 +21,7 @@ set_target_properties(DataMySQL
|
||||
DEFINE_SYMBOL MySQL_EXPORTS
|
||||
)
|
||||
|
||||
-target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
|
||||
+target_link_libraries(DataMySQL PUBLIC Poco::Data ${MYSQL_LIBRARIES})
|
||||
target_include_directories(DataMySQL
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt
|
||||
index b52e2c5..0dcfae2 100644
|
||||
--- a/Data/SQLite/CMakeLists.txt
|
||||
+++ b/Data/SQLite/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- find_package(SQLite3 REQUIRED)
|
||||
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||
else()
|
||||
# sqlite3
|
||||
POCO_SOURCES(SQLITE_SRCS sqlite3
|
||||
@@ -43,7 +43,7 @@ target_include_directories(DataSQLite
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
|
||||
+ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3)
|
||||
target_compile_definitions(DataSQLite PUBLIC
|
||||
POCO_UNBUNDLED
|
||||
SQLITE_THREADSAFE=1
|
||||
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
|
||||
index 6f5100f..c9fa2e5 100644
|
||||
--- a/Foundation/CMakeLists.txt
|
||||
+++ b/Foundation/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc)
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if(POCO_UNBUNDLED)
|
||||
- find_package(PCRE REQUIRED)
|
||||
+ find_package(unofficial-pcre CONFIG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
|
||||
@@ -101,7 +101,7 @@ set_target_properties(Foundation
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
||||
+ target_link_libraries(Foundation PUBLIC unofficial::pcre::pcre ZLIB::ZLIB)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
add_definitions(
|
||||
-D_pcre_utf8_table1=_poco_pcre_utf8_table1
|
||||
diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt
|
||||
index 4fbf06f..793285a 100644
|
||||
--- a/XML/CMakeLists.txt
|
||||
+++ b/XML/CMakeLists.txt
|
||||
@@ -20,7 +20,7 @@ endif()
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if(POCO_UNBUNDLED)
|
||||
- find_package(EXPAT REQUIRED)
|
||||
+ find_package(expat CONFIG REQUIRED)
|
||||
else()
|
||||
POCO_SOURCES(SRCS expat
|
||||
src/xmlparse.cpp
|
||||
@@ -50,7 +50,7 @@ target_include_directories(XML
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- target_link_libraries(XML PUBLIC EXPAT::EXPAT)
|
||||
+ target_link_libraries(XML PUBLIC expat::expat)
|
||||
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
|
||||
else()
|
||||
if(WIN32)
|
||||
diff --git a/cmake/PocoConfig.cmake.in b/cmake/PocoConfig.cmake.in
|
||||
index 173eacd..9a375cd 100644
|
||||
--- a/cmake/PocoConfig.cmake.in
|
||||
+++ b/cmake/PocoConfig.cmake.in
|
||||
@@ -8,6 +8,13 @@ if (NOT Poco_FIND_COMPONENTS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(ZLIB REQUIRED)
|
||||
+find_dependency(unofficial-pcre REQUIRED)
|
||||
+if(Poco_FIND_REQUIRED_XML)
|
||||
+ find_dependency(EXPAT REQUIRED)
|
||||
+endif()
|
||||
+
|
||||
set(_Poco_FIND_PARTS_REQUIRED)
|
||||
if (Poco_FIND_REQUIRED)
|
||||
set(_Poco_FIND_PARTS_REQUIRED REQUIRED)
|
||||
|
@ -1,22 +0,0 @@
|
||||
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
|
||||
index 6b276be..f093991 100644
|
||||
--- a/Foundation/CMakeLists.txt
|
||||
+++ b/Foundation/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc)
|
||||
# If POCO_UNBUNDLED is enabled we try to find the required packages
|
||||
# The configuration will fail if the packages are not found
|
||||
if(POCO_UNBUNDLED)
|
||||
- find_package(PCRE REQUIRED)
|
||||
+ find_package(unofficial-pcre CONFIG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
#HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
|
||||
@@ -101,7 +101,7 @@ set_target_properties(Foundation
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
- target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
||||
+ target_link_libraries(Foundation PUBLIC unofficial::pcre::pcre ZLIB::ZLIB)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
@ -1,3 +1,5 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "UWP")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO pocoproject/poco
|
||||
@ -5,12 +7,8 @@ vcpkg_from_github(
|
||||
SHA512 4c53a24a2ab9c57f4bf94e233da65cbb144c101b7d8d422d7e687d6c90ce0b53cb7bcfae63205ff30cade0fd07319e44a32035c1b15637ea2958986efc4ad5df
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
# Add include path to public interface for static build
|
||||
include_pcre.patch
|
||||
# Fix embedded copy of pcre in static linking mode
|
||||
static_pcre.patch
|
||||
# Use vcpkg installed libharu for feature pdf
|
||||
use-vcpkg-libharu.patch
|
||||
# Add the support of arm64-windows
|
||||
arm64_pcre.patch
|
||||
fix_dependency.patch
|
||||
@ -20,36 +18,32 @@ file(REMOVE "${SOURCE_PATH}/Foundation/src/pcre.h")
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/V39/FindEXPAT.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/V313/FindSQLite3.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/FindPCRE.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/FindMySQL.cmake")
|
||||
|
||||
# define Poco linkage type
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
pdf ENABLE_PDF
|
||||
pdf ENABLE_PDF
|
||||
netssl ENABLE_NETSSL
|
||||
netssl ENABLE_NETSSL_WIN
|
||||
netssl ENABLE_CRYPTO
|
||||
sqlite3 ENABLE_DATA_SQLITE
|
||||
postgresql ENABLE_DATA_POSTGRESQL
|
||||
)
|
||||
|
||||
# MySQL / MariaDDB feature
|
||||
if("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES)
|
||||
if("mysql" IN_LIST FEATURES)
|
||||
# enabling MySQL support
|
||||
set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql")
|
||||
set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib")
|
||||
set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib")
|
||||
endif()
|
||||
if("mariadb" IN_LIST FEATURES)
|
||||
# enabling MariaDB support
|
||||
set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql")
|
||||
set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib")
|
||||
set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib")
|
||||
endif()
|
||||
if ("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES)
|
||||
set(POCO_USE_MYSQL ON)
|
||||
else()
|
||||
set(POCO_USE_MYSQL OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
#PREFER_NINJA
|
||||
PREFER_NINJA
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
# Set to OFF|ON (default is OFF) to control linking dependencies as external
|
||||
# force to use dependencies as external
|
||||
-DPOCO_UNBUNDLED=ON
|
||||
# Define linking feature
|
||||
-DPOCO_STATIC=${POCO_STATIC}
|
||||
@ -74,16 +68,18 @@ vcpkg_configure_cmake(
|
||||
-DENABLE_POCODOC=ON
|
||||
-DENABLE_PAGECOMPILER=ON
|
||||
-DENABLE_PAGECOMPILER_FILE2PAGE=ON
|
||||
#
|
||||
-DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR}
|
||||
OPTIONS_RELEASE
|
||||
-DMYSQL_LIB=${MYSQL_LIBRARY}
|
||||
OPTIONS_DEBUG
|
||||
-DMYSQL_LIB=${MYSQL_LIBRARY_DEBUG}
|
||||
-DPOCO_DISABLE_INTERNAL_OPENSSL=ON
|
||||
-DENABLE_APACHECONNECTOR=OFF
|
||||
-DENABLE_DATA_MYSQL=${POCO_USE_MYSQL}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Move apps to the tools folder
|
||||
vcpkg_copy_tools(TOOL_NAMES cpspc f2cpsp PocoDoc tec AUTO_CLEAN)
|
||||
|
||||
# Copy additional include files not part of any libraries
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL")
|
||||
file(COPY ${SOURCE_PATH}/Data/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
@ -102,48 +98,12 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/SQLite")
|
||||
file(COPY ${SOURCE_PATH}/Data/SQLite/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
endif()
|
||||
|
||||
# Move apps to the tools folder
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cpspc.exe")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/tools/cpspc.exe)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.exe ${CURRENT_PACKAGES_DIR}/tools/f2cpsp.exe)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.exe ${CURRENT_PACKAGES_DIR}/tools/PocoDoc.exe)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec.exe ${CURRENT_PACKAGES_DIR}/tools/tec.exe)
|
||||
else()
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc ${CURRENT_PACKAGES_DIR}/tools/cpspc)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp ${CURRENT_PACKAGES_DIR}/tools/f2cpsp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc ${CURRENT_PACKAGES_DIR}/tools/PocoDoc)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec ${CURRENT_PACKAGES_DIR}/tools/tec)
|
||||
endif()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static OR VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
else()
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/bin/cpspc.pdb
|
||||
${CURRENT_PACKAGES_DIR}/bin/f2cpsp.pdb
|
||||
${CURRENT_PACKAGES_DIR}/bin/PocoDoc.pdb
|
||||
${CURRENT_PACKAGES_DIR}/bin/tec.pdb
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.exe
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.pdb
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.exe
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.pdb
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.exe
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.pdb
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/tec.exe
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/tec.pdb)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Poco")
|
||||
else()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,26 +1,26 @@
|
||||
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
|
||||
index f093991..c9fa2e5 100644
|
||||
--- a/Foundation/CMakeLists.txt
|
||||
+++ b/Foundation/CMakeLists.txt
|
||||
@@ -103,6 +103,21 @@ set_target_properties(Foundation
|
||||
if(POCO_UNBUNDLED)
|
||||
target_link_libraries(Foundation PUBLIC unofficial::pcre::pcre ZLIB::ZLIB)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
+ add_definitions(
|
||||
+ -D_pcre_utf8_table1=_poco_pcre_utf8_table1
|
||||
+ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size
|
||||
+ -D_pcre_utf8_table2=_poco_pcre_utf8_table2
|
||||
+ -D_pcre_utf8_table3=_poco_pcre_utf8_table3
|
||||
+ -D_pcre_utf8_table4=_poco_pcre_utf8_table4
|
||||
+ -D_pcre_utt_names=_poco_pcre_utt_names
|
||||
+ -D_pcre_utt=_poco_pcre_utt
|
||||
+ -D_pcre_utt_size=_poco_pcre_utt_size
|
||||
+ -D_pcre_OP_lengths=_poco_pcre_OP_lengths
|
||||
+ -D_pcre_hspace_list=_poco_pcre_hspace_list
|
||||
+ -D_pcre_vspace_list=_poco_pcre_vspace_list
|
||||
+ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype
|
||||
+ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable
|
||||
+ )
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
||||
target_include_directories(Foundation
|
||||
diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
|
||||
index 6b276be..6f5100f 100644
|
||||
--- a/Foundation/CMakeLists.txt
|
||||
+++ b/Foundation/CMakeLists.txt
|
||||
@@ -103,6 +103,21 @@ set_target_properties(Foundation
|
||||
if(POCO_UNBUNDLED)
|
||||
target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
+ add_definitions(
|
||||
+ -D_pcre_utf8_table1=_poco_pcre_utf8_table1
|
||||
+ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size
|
||||
+ -D_pcre_utf8_table2=_poco_pcre_utf8_table2
|
||||
+ -D_pcre_utf8_table3=_poco_pcre_utf8_table3
|
||||
+ -D_pcre_utf8_table4=_poco_pcre_utf8_table4
|
||||
+ -D_pcre_utt_names=_poco_pcre_utt_names
|
||||
+ -D_pcre_utt=_poco_pcre_utt
|
||||
+ -D_pcre_utt_size=_poco_pcre_utt_size
|
||||
+ -D_pcre_OP_lengths=_poco_pcre_OP_lengths
|
||||
+ -D_pcre_hspace_list=_poco_pcre_hspace_list
|
||||
+ -D_pcre_vspace_list=_poco_pcre_vspace_list
|
||||
+ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype
|
||||
+ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable
|
||||
+ )
|
||||
endif(POCO_UNBUNDLED)
|
||||
|
||||
target_include_directories(Foundation
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b664afd..2174556 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -327,8 +327,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
|
||||
list(APPEND Poco_COMPONENTS "Redis")
|
||||
endif()
|
||||
|
||||
-if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
|
||||
- add_subdirectory(PDF)
|
||||
+if(ENABLE_PDF)
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+ find_library(PocoPDF_LIBRARY_RELEASE NAMES libhpdf)
|
||||
+ find_library(PocoPDF_LIBRARY_DEBUG NAMES libhpdfd)
|
||||
+ select_library_configurations(PocoPDF)
|
||||
list(APPEND Poco_COMPONENTS "PDF")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user