aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_from_sourceforge.cmake
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2020-07-13 13:43:39 -0700
committerGitHub <noreply@github.com>2020-07-13 13:43:39 -0700
commit385fb523320da4617966e34fcd586beecfcc9014 (patch)
treec4a66d3446fa429539c05e7ba1a5f633214dc9d3 /scripts/cmake/vcpkg_from_sourceforge.cmake
parent63578d09b00fb2b33ddc0d38685eadbb1a3ffa3a (diff)
downloadvcpkg-385fb523320da4617966e34fcd586beecfcc9014.tar.gz
vcpkg-385fb523320da4617966e34fcd586beecfcc9014.zip
[vcpkg] Track hashes of cmake script helpers in consuming portfiles (#12254)
* [vcpkg] Track hashes of cmake script helpers in consuming portfiles * [vcpkg] Format * [vcpkg_find_acquire_program] Use cpkg_from_sourceforge for FLEX and BISON Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'scripts/cmake/vcpkg_from_sourceforge.cmake')
-rw-r--r--scripts/cmake/vcpkg_from_sourceforge.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/cmake/vcpkg_from_sourceforge.cmake b/scripts/cmake/vcpkg_from_sourceforge.cmake
index 258499242..34b2a12b0 100644
--- a/scripts/cmake/vcpkg_from_sourceforge.cmake
+++ b/scripts/cmake/vcpkg_from_sourceforge.cmake
@@ -42,6 +42,11 @@
## ### SHA512
## The SHA512 hash that should match the archive.
##
+## ### WORKING_DIRECTORY
+## If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`.
+##
+## Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`).
+##
## ### PATCHES
## A list of patches to be applied to the extracted sources.
##
@@ -61,7 +66,7 @@
function(vcpkg_from_sourceforge)
set(booleanValueArgs DISABLE_SSL NO_REMOVE_ONE_LEVEL)
- set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 FILENAME)
+ set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 FILENAME WORKING_DIRECTORY)
set(multipleValuesArgs PATCHES)
cmake_parse_arguments(_vdus "${booleanValueArgs}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
@@ -77,6 +82,12 @@ function(vcpkg_from_sourceforge)
message(FATAL_ERROR "The sourceforge repository must be specified.")
endif()
+ if(DEFINED _vdus_WORKING_DIRECTORY)
+ set(WORKING_DIRECTORY WORKING_DIRECTORY "${_vdus_WORKING_DIRECTORY}")
+ else()
+ set(WORKING_DIRECTORY)
+ endif()
+
if (_vdus_DISABLE_SSL)
set(URL_PROTOCOL http:)
else()
@@ -181,6 +192,7 @@ function(vcpkg_from_sourceforge)
ARCHIVE "${ARCHIVE}"
REF "${SANITIZED_REF}"
${NO_REMOVE_ONE_LEVEL}
+ ${WORKING_DIRECTORY}
PATCHES ${_vdus_PATCHES}
)