diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-30 17:36:56 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-30 17:36:56 -0700 |
| commit | ce68e1a11ed846bdbab59d1e07a9aeb4506c6037 (patch) | |
| tree | f3c392f7fd0395c89a41de7bcdbc99654c6262c7 /scripts | |
| parent | 25145714f7e4474c73a230a56910e01960bada6b (diff) | |
| parent | 98b4a67fe1af6974f146b518c0f1644de290d8da (diff) | |
| download | vcpkg-ce68e1a11ed846bdbab59d1e07a9aeb4506c6037.tar.gz vcpkg-ce68e1a11ed846bdbab59d1e07a9aeb4506c6037.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/ports.cmake | 14 | ||||
| -rw-r--r-- | scripts/templates/CONTROL.in | 3 |
2 files changed, 13 insertions, 4 deletions
diff --git a/scripts/ports.cmake b/scripts/ports.cmake index be73209ad..fbe80cc20 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -39,16 +39,18 @@ macro(debug_message) endmacro() if(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) - message(FATAL_ERROR "Portfile already 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) get_filename_component(FILENAME "${URL}" NAME) endif() string(REGEX REPLACE "(\\.(zip|gz|tar|tgz|bz2))+\$" "" ROOT_NAME ${FILENAME}) if(EXISTS ${DOWNLOADS}/${FILENAME}) - message(STATUS "Using pre-downloaded: ${DOWNLOADS}/${FILENAME}") - message(STATUS "If this is not desired, delete the file and ${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake") + message(STATUS "Using pre-downloaded: ${NATIVE_DOWNLOADS}\\${FILENAME}") + message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}") else() include(vcpkg_download_distfile) file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code) @@ -60,8 +62,12 @@ if(CMD MATCHES "^CREATE$") 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) - message(STATUS "Generated portfile: ${VCPKG_ROOT_DIR}/ports/${PORT}/portfile.cmake") + message(STATUS "Generated portfile: ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\portfile.cmake") + message(STATUS "Generated CONTROL: ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}\\CONTROL") + message(STATUS "To launch an editor for these new files, run") + message(STATUS " vcpkg edit ${PORT}") elseif(CMD MATCHES "^BUILD$") if(NOT DEFINED CURRENT_PORT_DIR) message(FATAL_ERROR "CURRENT_PORT_DIR was not defined") diff --git a/scripts/templates/CONTROL.in b/scripts/templates/CONTROL.in new file mode 100644 index 000000000..c5b706861 --- /dev/null +++ b/scripts/templates/CONTROL.in @@ -0,0 +1,3 @@ +Source: @PORT@ +Version: +Description:
\ No newline at end of file |
