aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-06-16 11:58:11 -0700
committerGitHub <noreply@github.com>2020-06-16 11:58:11 -0700
commit04e214eb0ef9cd5fc4308dd7a43943e98ae1d534 (patch)
treee11b55a563310307a553811877f6cae21633afd1 /scripts
parent7192d3affa4b1d8f88e3e730eb561612c24f7d78 (diff)
downloadvcpkg-04e214eb0ef9cd5fc4308dd7a43943e98ae1d534.tar.gz
vcpkg-04e214eb0ef9cd5fc4308dd7a43943e98ae1d534.zip
[vcpkg] Fix create by extracting common paths settings (#11842)
Resolves #11784
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ports.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/ports.cmake b/scripts/ports.cmake
index 9b33745f9..cd687026f 100644
--- a/scripts/ports.cmake
+++ b/scripts/ports.cmake
@@ -78,7 +78,7 @@ if(CMD MATCHES "^BUILD$")
elseif(CMD MATCHES "^CREATE$")
file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR)
file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS)
- if(EXISTS ports/${PORT}/portfile.cmake)
+ if(EXISTS ${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake)
message(FATAL_ERROR "Portfile already exists: '${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\portfile.cmake'")
endif()
if(NOT FILENAME)
@@ -99,9 +99,9 @@ elseif(CMD MATCHES "^CREATE$")
endif()
file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512)
- file(MAKE_DIRECTORY ports/${PORT})
- configure_file(${SCRIPTS}/templates/portfile.in.cmake ports/${PORT}/portfile.cmake @ONLY)
- configure_file(${SCRIPTS}/templates/CONTROL.in ports/${PORT}/CONTROL @ONLY)
+ file(MAKE_DIRECTORY ${VCPKG_ROOT_DIR}/ports/${PORT})
+ configure_file(${SCRIPTS}/templates/portfile.in.cmake ${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake @ONLY)
+ configure_file(${SCRIPTS}/templates/CONTROL.in ${VCPKG_ROOT_DIR}/ports/${PORT}/CONTROL @ONLY)
message(STATUS "Generated portfile: ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\portfile.cmake")
message(STATUS "Generated CONTROL: ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\CONTROL")