aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikeGitb <MikeGitb@users.noreply.github.com>2018-08-01 19:39:01 +0200
committerRobert Schumacher <roschuma@microsoft.com>2018-08-01 10:39:01 -0700
commitcaa9f2e3d5f3ea73e72bcf078b180337fa6602d3 (patch)
treead36ea43afa9bb84456c69f58b5a649f4795d77c
parent3dea60d2e98caa2d9e9bc89e7acfeb8caf5fe792 (diff)
downloadvcpkg-caa9f2e3d5f3ea73e72bcf078b180337fa6602d3.tar.gz
vcpkg-caa9f2e3d5f3ea73e72bcf078b180337fa6602d3.zip
[cxxopts] Install via cmake (#3985)
-rw-r--r--ports/cxxopts/CONTROL2
-rw-r--r--ports/cxxopts/portfile.cmake16
2 files changed, 15 insertions, 3 deletions
diff --git a/ports/cxxopts/CONTROL b/ports/cxxopts/CONTROL
index 98d31cc4c..915124fb9 100644
--- a/ports/cxxopts/CONTROL
+++ b/ports/cxxopts/CONTROL
@@ -1,3 +1,3 @@
Source: cxxopts
-Version: 2.1.0
+Version: 2.1.0-1
Description: This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options
diff --git a/ports/cxxopts/portfile.cmake b/ports/cxxopts/portfile.cmake
index e3c9f6c27..40d240b37 100644
--- a/ports/cxxopts/portfile.cmake
+++ b/ports/cxxopts/portfile.cmake
@@ -6,6 +6,18 @@ vcpkg_from_github(
SHA512 b3549bb36fd3cb27b30a7164992ce19ddf129e7ee071956d58047101e4181cd9f08c8dd4c5e2d5499628deeb52a40bbc2fecfe68e9875c07396e6b7434161603
HEAD_REF master
)
-file(INSTALL ${SOURCE_PATH}/include/cxxopts.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCXXOPTS_BUILD_EXAMPLES=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cxxopts TARGET_PATH share/cxxopts)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright)
-vcpkg_copy_pdbs()