mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[expat] Fix a few details with expat. (#13022)
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
parent
2f52c7cbaa
commit
53a47bca4f
@ -1,45 +0,0 @@
|
||||
diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
|
||||
index 9caffcf..deb01a0 100644
|
||||
--- a/cmake/findDependencies.cmake
|
||||
+++ b/cmake/findDependencies.cmake
|
||||
@@ -33,7 +33,7 @@ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP)
|
||||
message(FATAL_ERROR "EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive. You can only choose one of them")
|
||||
else()
|
||||
if (EXIV2_ENABLE_XMP)
|
||||
- find_package(EXPAT REQUIRED)
|
||||
+ find_package(expat CONFIG REQUIRED)
|
||||
elseif (EXIV2_ENABLE_EXTERNAL_XMP)
|
||||
find_package(XmpSdk REQUIRED)
|
||||
endif ()
|
||||
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
|
||||
index ae011dc..7390d26 100644
|
||||
--- a/xmpsdk/CMakeLists.txt
|
||||
+++ b/xmpsdk/CMakeLists.txt
|
||||
@@ -26,16 +26,21 @@ add_library(exiv2-xmp STATIC
|
||||
include/XMP_Version.h
|
||||
)
|
||||
|
||||
-target_link_libraries(exiv2-xmp
|
||||
- PRIVATE
|
||||
- ${EXPAT_LIBRARY}
|
||||
-)
|
||||
+if(WIN32 AND NOT MINGW)
|
||||
+ target_link_libraries(exiv2-xmp
|
||||
+ PRIVATE
|
||||
+ expat::libexpat
|
||||
+ )
|
||||
+else()
|
||||
+ target_link_libraries(exiv2-xmp
|
||||
+ PRIVATE
|
||||
+ expat::expat
|
||||
+ )
|
||||
+endif()
|
||||
|
||||
target_include_directories(exiv2-xmp
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
|
||||
- PRIVATE
|
||||
- ${EXPAT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Prevent a denial-service-attack related to XML entity expansion
|
@ -1,17 +1,12 @@
|
||||
#https://github.com/Exiv2/exiv2/issues/1063
|
||||
vcpkg_fail_port_install(ON_TARGET "uwp")
|
||||
|
||||
if("xmp" IN_LIST FEATURES)
|
||||
set(EXPAT_PATCH ${CMAKE_CURRENT_LIST_DIR}/expat.patch)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Exiv2/exiv2
|
||||
REF 194bb65ac568a5435874c9d9d73b1c8a68e4edec #v0.27.3
|
||||
SHA512 35a5a41e0a6cfe04d1ed005c8116ad4430516402b925db3d4f719e2385e2cfb09359eb7ab51853bc560138f221900778cd2e2d39f108c513b3e7d22dbb9bf503
|
||||
HEAD_REF master
|
||||
PATCHES ${EXPAT_PATCH}
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: expat
|
||||
Version: 2.2.9
|
||||
Version: 2020-08-18
|
||||
Homepage: https://github.com/libexpat/libexpat
|
||||
Description: XML parser library written in C
|
@ -1,40 +0,0 @@
|
||||
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
|
||||
index 2084424..f3b9207 100644
|
||||
--- a/expat/CMakeLists.txt
|
||||
+++ b/expat/CMakeLists.txt
|
||||
@@ -269,6 +269,10 @@ if(EXPAT_WITH_LIBBSD)
|
||||
target_link_libraries(${_EXPAT_TARGET} ${LIB_BSD})
|
||||
endif()
|
||||
|
||||
+target_include_directories(${_EXPAT_TARGET} INTERFACE
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
|
||||
+ $<INSTALL_INTERFACE:include>)
|
||||
+
|
||||
set(LIBCURRENT 7) # sync
|
||||
set(LIBREVISION 11) # with
|
||||
set(LIBAGE 6) # configure.ac!
|
||||
@@ -490,7 +494,7 @@ configure_package_config_file(
|
||||
cmake/expat-config.cmake.in
|
||||
cmake/expat-config.cmake
|
||||
INSTALL_DESTINATION
|
||||
- ${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/cmake/expat/
|
||||
)
|
||||
write_basic_package_version_file(
|
||||
cmake/expat-config-version.cmake
|
||||
@@ -507,13 +511,13 @@ expat_install(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake/expat-config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake/expat-config-version.cmake
|
||||
DESTINATION
|
||||
- ${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/cmake/expat/
|
||||
)
|
||||
expat_install(
|
||||
EXPORT
|
||||
expat
|
||||
DESTINATION
|
||||
- ${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/cmake/expat/
|
||||
NAMESPACE
|
||||
expat::
|
||||
)
|
15
ports/expat/pkgconfig.patch
Normal file
15
ports/expat/pkgconfig.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
|
||||
index a67f081b1..cc220f2a1 100644
|
||||
--- a/expat/CMakeLists.txt
|
||||
+++ b/expat/CMakeLists.txt
|
||||
@@ -294,7 +294,9 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL
|
||||
#
|
||||
# pkg-config file
|
||||
#
|
||||
+string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER)
|
||||
+set(_EXPAT_OUTPUT_NAME ${_EXPAT_OUTPUT_NAME}${CMAKE_${BUILD_TYPE_UPPER}_POSTFIX})
|
||||
-if(NOT MSVC)
|
||||
+if(1)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
@ -1,11 +1,11 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libexpat/libexpat
|
||||
REF a7bc26b69768f7fb24f0c7976fae24b157b85b13 #tag 2.2.9
|
||||
SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd
|
||||
REF c092d40c300c6d219cb3b111932a824022265370 #Head from commit 2020-08-18
|
||||
SHA512 5a5d41b500f5602a32aea8f4e15593e639206bb3f97553497e80b2975360cac88ac90386f5efc11728614f24bbb620fb908a3c8ca71c9e7b312f6157b2477afe
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-find-package-by-cmake.patch
|
||||
pkgconfig.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
@ -26,17 +26,12 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat-2.2.9)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
||||
if(EXE OR DEBUG_EXE)
|
||||
file(REMOVE ${EXE} ${DEBUG_EXE})
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h
|
||||
"! defined(XML_STATIC)"
|
||||
@ -48,3 +43,5 @@ vcpkg_copy_pdbs()
|
||||
|
||||
#Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
|
27
ports/expat/vcpkg-cmake-wrapper.cmake
Normal file
27
ports/expat/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
set(EXPATNAMES expat expatw libexpat libexpatw)
|
||||
set(DEBUGNAMES)
|
||||
foreach(_CRT "" MT MD)
|
||||
foreach(name IN LISTS EXPATNAMES)
|
||||
list(APPEND EXPATNAMES ${name}${_CRT})
|
||||
list(APPEND DEBUGNAMES ${name}d${_CRT})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
find_library(EXPAT_LIBRARY_DEBUG NAMES ${DEBUGNAMES} ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
|
||||
find_library(EXPAT_LIBRARY_RELEASE NAMES ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
||||
select_library_configurations(EXPAT)
|
||||
set(EXPAT_LIBRARY "${EXPAT_LIBRARIES}" CACHE STRING "" FORCE)
|
||||
_find_package(${ARGS})
|
||||
if(EXPAT_FOUND AND TARGET EXPAT::EXPAT)
|
||||
if(EXPAT_LIBRARY_DEBUG)
|
||||
set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
if(EXPAT_LIBRARY_RELEASE)
|
||||
set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(EXPATNAMES)
|
||||
unset(DEBUGNAMES)
|
@ -52,11 +52,7 @@ else()
|
||||
target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/unix)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT MINGW)
|
||||
target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::libexpat)
|
||||
else()
|
||||
target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::expat)
|
||||
endif()
|
||||
target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::expat)
|
||||
|
||||
install(TARGETS fontconfig
|
||||
EXPORT fontconfig-targets
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: fontconfig
|
||||
Version: 2.12.4
|
||||
Port-Version: 12
|
||||
Port-Version: 13
|
||||
Homepage: https://www.freedesktop.org/software/fontconfig/front.html
|
||||
Description: Library for configuring and customizing font access.
|
||||
Build-Depends: freetype, expat, libiconv, dirent
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: gdcm
|
||||
Version: 3.0.5
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Homepage: https://github.com/malaterre/GDCM
|
||||
Description: Grassroots DICOM library
|
||||
Build-Depends: zlib, expat, openjpeg
|
||||
|
@ -12,7 +12,6 @@ vcpkg_from_github(
|
||||
use-openjpeg-config.patch
|
||||
fix-share-path.patch
|
||||
Fix-Cmake_DIR.patch
|
||||
use-expat-config.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake)
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 32786db..4215d25 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -426,7 +426,7 @@ endif()
|
||||
|
||||
if(GDCM_USE_SYSTEM_EXPAT)
|
||||
# If user say so, then this is a requirement !
|
||||
- find_package(EXPAT REQUIRED)
|
||||
+ find_package(expat CONFIG REQUIRED)
|
||||
set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
|
||||
else()
|
||||
set(GDCM_EXPAT_LIBRARIES "gdcmexpat")
|
@ -1,6 +1,6 @@
|
||||
Source: itk
|
||||
Version: 5.1.0
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.
|
||||
Homepage: https://github.com/InsightSoftwareConsortium/ITK
|
||||
Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[core,cpp], openjpeg[core], fftw3[core], gtest, gdcm, icu, minc
|
||||
|
@ -1,54 +0,0 @@
|
||||
diff --git a/Modules/IO/GDCM/itk-module.cmake b/Modules/IO/GDCM/itk-module.cmake
|
||||
index 2703612..51f0214 100644
|
||||
--- a/Modules/IO/GDCM/itk-module.cmake
|
||||
+++ b/Modules/IO/GDCM/itk-module.cmake
|
||||
@@ -1,7 +1,7 @@
|
||||
set(DOCUMENTATION "This module contains ITK ImageIO classes for the <a
|
||||
href=\"http://sourceforge.net/projects/gdcm/\">Grassroots DICOM (GDCM)</a> based
|
||||
readers and writers of the medical imaging DICOM standard.")
|
||||
-
|
||||
+find_package(expat CONFIG REQUIRED)
|
||||
itk_module(ITKIOGDCM
|
||||
ENABLE_SHARED
|
||||
DEPENDS
|
||||
@@ -9,6 +9,7 @@ itk_module(ITKIOGDCM
|
||||
ITKIOImageBase
|
||||
PRIVATE_DEPENDS
|
||||
ITKGDCM
|
||||
+ ITKExpat
|
||||
TEST_DEPENDS
|
||||
ITKTestKernel
|
||||
ITKGDCM
|
||||
diff --git a/Modules/ThirdParty/Expat/CMakeLists.txt b/Modules/ThirdParty/Expat/CMakeLists.txt
|
||||
index f69709d..9b49323 100644
|
||||
--- a/Modules/ThirdParty/Expat/CMakeLists.txt
|
||||
+++ b/Modules/ThirdParty/Expat/CMakeLists.txt
|
||||
@@ -5,10 +5,12 @@ option(ITK_USE_SYSTEM_EXPAT "Use system-installed expat" ${ITK_USE_SYSTEM_LIBRAR
|
||||
mark_as_advanced(ITK_USE_SYSTEM_EXPAT)
|
||||
|
||||
if(ITK_USE_SYSTEM_EXPAT)
|
||||
- find_package(EXPAT REQUIRED)
|
||||
- set(ITKExpat_INCLUDE_DIRS ${ITKExpat_BINARY_DIR}/src )
|
||||
- set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}")
|
||||
- set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}")
|
||||
+ find_package(expat CONFIG REQUIRED)
|
||||
+ if(WIN32 AND NOT MINGW)
|
||||
+ set(ITKExpat_LIBRARIES expat::libexpat)
|
||||
+ else()
|
||||
+ set(ITKExpat_LIBRARIES expat::expat)
|
||||
+ endif()
|
||||
set(ITKExpat_NO_SRC 1)
|
||||
else()
|
||||
set(ITKExpat_INCLUDE_DIRS
|
||||
diff --git a/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt b/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt
|
||||
index 3f83225..c7ddbbe 100644
|
||||
--- a/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt
|
||||
+++ b/Modules/ThirdParty/GIFTI/src/gifticlib/CMakeLists.txt
|
||||
@@ -11,6 +11,7 @@ set(GIFTI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/gifti")
|
||||
|
||||
if("${ITK_VERSION_MAJOR}" GREATER 0.0)
|
||||
# ITK provides expat and zlib.
|
||||
+ find_package(expat CONFIG REQUIRED)
|
||||
include_directories(${ITKNIFTI_INCLUDE_DIRS})
|
||||
set(PACKAGE_PREFIX "ITK")
|
||||
set(EXPAT_LIBRARIES ${ITKExpat_LIBRARIES})
|
@ -16,7 +16,6 @@ vcpkg_from_github(
|
||||
python_gpu_wrapping.patch
|
||||
opencl.patch
|
||||
cufftw.patch
|
||||
expat.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: libkml
|
||||
Version: 1.3.0
|
||||
Port-Version: 5
|
||||
Port-Version: 6
|
||||
Homepage: https://github.com/libkml/libkml
|
||||
Description: Reference implementation of OGC KML 2.2
|
||||
Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr
|
@ -1,20 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9728ead..f9e8051 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -93,8 +93,13 @@ set(MINIZIP_DEPENDS "" CACHE INTERNAL "MINIZIP_DEPENDS")
|
||||
|
||||
set(LIBKML_TARGETS)
|
||||
|
||||
-find_package(EXPAT)
|
||||
-if(EXPAT_FOUND)
|
||||
+find_package(expat CONFIG REQUIRED)
|
||||
+if(WIN32 AND NOT MINGW)
|
||||
+ set(EXPAT_LIBRARY expat::libexpat)
|
||||
+else()
|
||||
+ set(EXPAT_LIBRARY expat::expat)
|
||||
+endif()
|
||||
+if(EXPAT_LIBRARY)
|
||||
include_directories(${EXPAT_INCLUDE_DIR})
|
||||
else()
|
||||
include(External_expat)
|
@ -6,7 +6,6 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
patch_empty_literal_on_vc.patch
|
||||
fix-expat.patch
|
||||
)
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/cmake/External_boost.cmake)
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: poco
|
||||
Version: 1.9.2
|
||||
Port-Version: 3
|
||||
Port-Version: 4
|
||||
Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng
|
||||
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
|
||||
|
@ -16,7 +16,6 @@ vcpkg_from_github(
|
||||
# Add the support of arm64-windows
|
||||
arm64_pcre.patch
|
||||
fix_foundation_link.patch
|
||||
use-vcpkg-expat.patch
|
||||
)
|
||||
|
||||
# define Poco linkage type
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt
|
||||
index d4a502a..780f5d0 100644
|
||||
--- a/XML/CMakeLists.txt
|
||||
+++ b/XML/CMakeLists.txt
|
||||
@@ -23,7 +23,12 @@ 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)
|
||||
+ if(WIN32 AND NOT MINGW)
|
||||
+ set(EXPAT_LIBRARIES expat::libexpat)
|
||||
+ else()
|
||||
+ set(EXPAT_LIBRARIES expat::expat)
|
||||
+ endif()
|
||||
set(SYSLIBS ${SYSLIBS} ${EXPAT_LIBRARIES})
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
else()
|
@ -1,6 +1,6 @@
|
||||
Source: vtk
|
||||
Version: 9.0.1
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Description: Software system for 3D computer graphics, image processing, and visualization
|
||||
Homepage: https://github.com/Kitware/VTK
|
||||
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2
|
||||
|
@ -1,13 +1,48 @@
|
||||
diff --git a/CMake/FindEXPAT.cmake b/CMake/FindEXPAT.cmake
|
||||
index 9d4c080..9e14e7d 100644
|
||||
index 45d923764..0ebcd3c83 100644
|
||||
--- a/CMake/FindEXPAT.cmake
|
||||
+++ b/CMake/FindEXPAT.cmake
|
||||
@@ -40,7 +40,7 @@ pkg_check_modules(PC_EXPAT QUIET expat)
|
||||
find_path(EXPAT_INCLUDE_DIR NAMES expat.h HINTS ${PC_EXPAT_INCLUDE_DIRS})
|
||||
@@ -73,15 +73,37 @@ if(EXPAT_FOUND)
|
||||
|
||||
# Look for the library.
|
||||
-find_library(EXPAT_LIBRARY NAMES expat libexpat HINTS ${PC_EXPAT_LIBRARY_DIRS})
|
||||
+find_library(EXPAT_LIBRARY NAMES expat libexpat libexpatMD HINTS ${PC_EXPAT_LIBRARY_DIRS})
|
||||
if(NOT TARGET EXPAT::EXPAT)
|
||||
include(vtkDetectLibraryType)
|
||||
- vtk_detect_library_type(expat_library_type
|
||||
- PATH "${EXPAT_LIBRARY}")
|
||||
+ if(EXPAT_LIBRARY_RELEASE)
|
||||
+ vtk_detect_library_type(expat_library_type
|
||||
+ PATH "${EXPAT_LIBRARY_RELEASE}")
|
||||
+ elseif(EXPAT_LIBRARY_DEBUG)
|
||||
+ vtk_detect_library_type(expat_library_type
|
||||
+ PATH "${EXPAT_LIBRARY_RELEASE}")
|
||||
+ else()
|
||||
+ vtk_detect_library_type(expat_library_type
|
||||
+ PATH "${EXPAT_LIBRARY}")
|
||||
+ endif()
|
||||
+
|
||||
add_library(EXPAT::EXPAT "${expat_library_type}" IMPORTED)
|
||||
unset(expat_library_type)
|
||||
set_target_properties(EXPAT::EXPAT PROPERTIES
|
||||
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
- IMPORTED_LOCATION "${EXPAT_LIBRARY}"
|
||||
- IMPORTED_IMPLIB "${EXPAT_LIBRARY}"
|
||||
- INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}")
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}")
|
||||
+ if(EXPAT_LIBRARY_RELEASE)
|
||||
+ set_target_properties(EXPAT::EXPAT PROPERTIES
|
||||
+ IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}"
|
||||
+ IMPORTED_IMPLIB_RELEASE "${EXPAT_LIBRARY_RELEASE}")
|
||||
+ endif()
|
||||
+ if(EXPAT_LIBRARY_DEBUG)
|
||||
+ set_target_properties(EXPAT::EXPAT PROPERTIES
|
||||
+ IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}"
|
||||
+ IMPORTED_IMPLIB_DEBUG "${EXPAT_LIBRARY_DEBUG}")
|
||||
+ endif()
|
||||
+ if(EXPAT_LIBRARY_RELEASE OR EXPAT_LIBRARY_DEBUG AND NOT (EXPAT_LIBRARY_RELEASE AND EXPAT_LIBRARY_DEBUG))
|
||||
+ set_target_properties(EXPAT::EXPAT PROPERTIES
|
||||
+ IMPORTED_LOCATION "${EXPAT_LIBRARY}"
|
||||
+ IMPORTED_IMPLIB "${EXPAT_LIBRARY}")
|
||||
+ endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h")
|
||||
file(STRINGS "${EXPAT_INCLUDE_DIR}/expat.h" expat_version_str
|
||||
|
@ -120,7 +120,7 @@ vcpkg_from_github(
|
||||
python_debug.patch
|
||||
fix-using-hdf5.patch
|
||||
# Last patch TODO: Patch out internal loguru
|
||||
FindExpat.patch
|
||||
FindExpat.patch # The find_library calls are taken care of by vcpkg-cmake-wrapper.cmake of expat
|
||||
)
|
||||
|
||||
# =============================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: wxwidgets
|
||||
Version: 3.1.4
|
||||
Port-Version: 2
|
||||
Port-Version: 3
|
||||
Homepage: https://github.com/wxWidgets/wxWidgets
|
||||
Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications.
|
||||
Build-Depends: zlib, libpng, tiff, expat
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff --git a/build/cmake/lib/expat.cmake b/build/cmake/lib/expat.cmake
|
||||
index 1d2b79b..04bef93 100644
|
||||
--- a/build/cmake/lib/expat.cmake
|
||||
+++ b/build/cmake/lib/expat.cmake
|
||||
@@ -7,14 +7,9 @@
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
-if(wxUSE_EXPAT STREQUAL "builtin")
|
||||
- wx_add_builtin_library(wxexpat
|
||||
- src/expat/expat/lib/xmlparse.c
|
||||
- src/expat/expat/lib/xmlrole.c
|
||||
- src/expat/expat/lib/xmltok.c
|
||||
- )
|
||||
- set(EXPAT_LIBRARIES wxexpat)
|
||||
- set(EXPAT_INCLUDE_DIRS ${wxSOURCE_DIR}/src/expat/expat/lib)
|
||||
-elseif(wxUSE_EXPAT)
|
||||
- find_package(EXPAT REQUIRED)
|
||||
+find_package(expat CONFIG REQUIRED)
|
||||
+if(WIN32 AND NOT MINGW)
|
||||
+ set(EXPAT_LIBRARIES expat::libexpat)
|
||||
+else()
|
||||
+ set(EXPAT_LIBRARIES expat::expat)
|
||||
endif()
|
@ -9,7 +9,6 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
disable-platform-lib-dir.patch
|
||||
fix-stl-build-vs2019-16.6.patch
|
||||
fix-expat.patch
|
||||
)
|
||||
|
||||
set(OPTIONS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user