aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-01-05 12:44:06 -0800
committerGitHub <noreply@github.com>2021-01-05 12:44:06 -0800
commite2cefd749d552b67a468018e5f6dd6e1fbb31863 (patch)
treeda1292340fb1f091c0431754940a5b20c1d5fc51
parent1aba77ae3b0f766eeea91888f4c4fa082e16d9ea (diff)
downloadvcpkg-e2cefd749d552b67a468018e5f6dd6e1fbb31863.tar.gz
vcpkg-e2cefd749d552b67a468018e5f6dd6e1fbb31863.zip
[wil] Use internal CMakeLists (#15438)
* [wil] Use internal CMakeLists * [wil] Fix install headers on Linux
-rw-r--r--ports/wil/CONTROL4
-rw-r--r--ports/wil/fix-install-headers.patch12
-rw-r--r--ports/wil/portfile.cmake18
3 files changed, 31 insertions, 3 deletions
diff --git a/ports/wil/CONTROL b/ports/wil/CONTROL
index 00b29b2e6..7d0e94202 100644
--- a/ports/wil/CONTROL
+++ b/ports/wil/CONTROL
@@ -1,3 +1,5 @@
Source: wil
Version: 2020-05-19
-Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns. \ No newline at end of file
+Port-Version: 1
+Homepage: https://github.com/microsoft/wil
+Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns.
diff --git a/ports/wil/fix-install-headers.patch b/ports/wil/fix-install-headers.patch
new file mode 100644
index 000000000..ae0e3aef3
--- /dev/null
+++ b/ports/wil/fix-install-headers.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 97a6737..4ae28fb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,4 +48,4 @@ install(EXPORT ${PROJECT_NAME}_targets
+ )
+
+ # Install the headers at a standard cmake location.
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+\ No newline at end of file
++install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/wil" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+\ No newline at end of file
diff --git a/ports/wil/portfile.cmake b/ports/wil/portfile.cmake
index 6e18ba110..d5fb8e7e0 100644
--- a/ports/wil/portfile.cmake
+++ b/ports/wil/portfile.cmake
@@ -5,7 +5,21 @@ vcpkg_from_github(
REF 3c00e7f1d8cf9930bbb8e5be3ef0df65c84e8928
SHA512 c9c3b4a41f7523a6da6378def4a6b868e9f66438998d04ae8489b9784db91664af7af3ab6ef73c104b9ac100c0dc5ae6a13e9cb9f679ba428a4abc07b32a7dce
HEAD_REF master
+ PATCHES fix-install-headers.patch
)
-file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR})
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wil RENAME copyright) \ No newline at end of file
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DWIL_BUILD_TESTS=OFF
+ -DWIL_BUILD_PACKAGING=ON
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/WIL)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/wil" RENAME copyright) \ No newline at end of file