From 04e214eb0ef9cd5fc4308dd7a43943e98ae1d534 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Tue, 16 Jun 2020 11:58:11 -0700 Subject: [vcpkg] Fix create by extracting common paths settings (#11842) Resolves #11784 --- scripts/ports.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') 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") -- cgit v1.2.3