vcpkg/ports/wxwidgets/fix-expat.patch

25 lines
835 B
Diff
Raw Normal View History

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()