aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-11-01 19:47:20 -0700
committerGitHub <noreply@github.com>2018-11-01 19:47:20 -0700
commitcc3fae8e5ca3e47ff2d7e1de428aba2d515bec54 (patch)
tree52bfd57600f616dd73cfb0fe85b7739ef5311e1a
parenta589f9f9ed1623f005d1760c957fe5942df68001 (diff)
downloadvcpkg-cc3fae8e5ca3e47ff2d7e1de428aba2d515bec54.tar.gz
vcpkg-cc3fae8e5ca3e47ff2d7e1de428aba2d515bec54.zip
[xerces-c] Avoid building executables (#4576)
-rw-r--r--ports/xerces-c/CONTROL2
-rw-r--r--ports/xerces-c/disable-tests.patch21
-rw-r--r--ports/xerces-c/portfile.cmake15
3 files changed, 27 insertions, 11 deletions
diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL
index 3ba79b1e8..006210e2f 100644
--- a/ports/xerces-c/CONTROL
+++ b/ports/xerces-c/CONTROL
@@ -1,3 +1,3 @@
Source: xerces-c
-Version: 3.2.2-4
+Version: 3.2.2-5
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/disable-tests.patch b/ports/xerces-c/disable-tests.patch
new file mode 100644
index 000000000..843b022d7
--- /dev/null
+++ b/ports/xerces-c/disable-tests.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4254f89..aa08565 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -175,10 +175,16 @@ install(
+ COMPONENT "development")
+
+ # Process subdirectories
++if(NOT DISABLE_DOC)
+ add_subdirectory(doc)
++endif()
+ add_subdirectory(src)
++if(NOT DISABLE_TESTS)
+ add_subdirectory(tests)
++endif()
++if(NOT DISABLE_SAMPLES)
+ add_subdirectory(samples)
++endif()
+
+ # Display configuration summary
+ message(STATUS "")
diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake
index 0976bbbd3..b14981c74 100644
--- a/ports/xerces-c/portfile.cmake
+++ b/ports/xerces-c/portfile.cmake
@@ -6,11 +6,16 @@ vcpkg_from_github(
REF Xerces-C_3_2_2
SHA512 66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea
HEAD_REF trunk
+ PATCHES disable-tests.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
+ OPTIONS
+ -DDISABLE_TESTS=ON
+ -DDISABLE_DOC=ON
+ -DDISABLE_SAMPLES=ON
)
vcpkg_install_cmake()
@@ -21,16 +26,6 @@ else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc)
endif()
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
-else()
- file(GLOB release_exe "${CURRENT_PACKAGES_DIR}/bin/*.exe")
- file(GLOB debug_exe "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
- if(release_exe OR debug_exe)
- file(REMOVE ${release_exe} ${debug_exe})
- endif()
-endif()
-
file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents)
string(REPLACE
"get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"