diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-06-16 11:58:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-16 11:58:11 -0700 |
| commit | 04e214eb0ef9cd5fc4308dd7a43943e98ae1d534 (patch) | |
| tree | e11b55a563310307a553811877f6cae21633afd1 /scripts | |
| parent | 7192d3affa4b1d8f88e3e730eb561612c24f7d78 (diff) | |
| download | vcpkg-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.cmake | 8 |
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") |
