aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/xerces-c/CONTROL2
-rw-r--r--ports/xerces-c/portfile.cmake22
2 files changed, 19 insertions, 5 deletions
diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL
index 822c50387..7958350c5 100644
--- a/ports/xerces-c/CONTROL
+++ b/ports/xerces-c/CONTROL
@@ -1,3 +1,3 @@
Source: xerces-c
-Version: 3.1.4
+Version: 3.1.4-1
Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs.
diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake
index 5543f80ed..67c917d55 100644
--- a/ports/xerces-c/portfile.cmake
+++ b/ports/xerces-c/portfile.cmake
@@ -7,6 +7,11 @@
#
include(vcpkg_common_functions)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ message(STATUS "Static linking not supported; building dynamic instead")
+ set(VCPKG_LIBRARY_LINKAGE )
+endif()
+
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xerces-c-3.1.4)
@@ -17,18 +22,25 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
-if (TRIPLET_SYSTEM_ARCH MATCHES "x86")
- set(BUILD_ARCH "Win32")
+if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
+ set(BUILD_ARCH "Win32")
+ set(OUTPUT_DIR "Win32")
+elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
+ set(BUILD_ARCH "x64")
+ set(OUTPUT_DIR "Win64")
else()
- set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
+ message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
-
vcpkg_build_msbuild(
#PROJECT_PATH ${SOURCE_PATH}/projects/Win32/VC14/xerces-all/xerces-all.sln
PROJECT_PATH ${SOURCE_PATH}/projects/Win32/VC14/xerces-all/xercesLib/xercesLib.vcxproj
PLATFORM ${BUILD_ARCH})
+file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Debug/xerces-c_3_1D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Debug/xerces-c_3D.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Release/xerces-c_3_1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Release/xerces-c_3.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(COPY ${SOURCE_PATH}/src/xercesc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp)
@@ -38,3 +50,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/util/MsgLoaders/ICU/
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/xerces-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xerces-c/copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file