-
Notifications
You must be signed in to change notification settings - Fork 7.7k
[vcpkg-make] new script port #33198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Alexander Neumann (Neumann-A)
wants to merge
113
commits into
microsoft:master
from
Neumann-A:vcpkg-make
Closed
[vcpkg-make] new script port #33198
Changes from 12 commits
Commits
Show all changes
113 commits
Select commit
Hold shift + click to select a range
b499ded
vcpkg-make initial idea
Neumann-A 62eb284
don't run ci
Neumann-A fffa564
Make vcpkg portfile execution debugable
Neumann-A 2e1d32a
WIP
Neumann-A 36ce65c
more WIP
Neumann-A 23d3308
install wrappers
Neumann-A 92457bf
keep the configure_make somewhere for reference
Neumann-A ab57ae7
add function to warn about spaces
Neumann-A 7918e80
strip whitespaces
Neumann-A d3b8148
WIP
Neumann-A 1f56817
determine configure triplet
Neumann-A 3ee0aa0
wip
Neumann-A 799b4c8
WIP
Neumann-A eaf0b67
WIP . move more stuff over.
Neumann-A c0dc7d7
WIP: create vcpkg_make_install
Neumann-A c5381ab
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A 3933374
WIP code tuning
Neumann-A 3952202
rename function to z_vcpkg_make_get_configure_triplets
Neumann-A 407d3f8
Merge branch 'vcpkg-make' of https://github.com/Neumann-A/vcpkg into …
Neumann-A 0b0df8d
add configure cache
Neumann-A facb152
More wip
Neumann-A 55ab880
fix includes
Neumann-A fb6f0b0
fix automatic file include
Neumann-A 1bf57d6
make gmp use the new stuff
Neumann-A a3621d3
fix stuff to configure (build flags are missing somehow)
Neumann-A 02dab22
more fixes
Neumann-A f9fc193
cleanup message
Neumann-A 06dd260
remove "
Neumann-A 051adc4
adjust tasks to test gmp
Neumann-A 5a181bf
move logfile analysis
Neumann-A a341a3d
minor fixes
Neumann-A 98f78da
revert pipeline
Neumann-A ce6f56f
backup path
Neumann-A 6434434
rename files
Neumann-A c7f2cc1
create vcpkg-scripts and move stuff around
Neumann-A 1430692
move more stuff
Neumann-A db55c39
more z_ prefixes
Neumann-A 1925080
fix include naming
Neumann-A 5092636
fix linux
Neumann-A b3038de
fix linux ?
Neumann-A 3daa802
use umask
Neumann-A 8e12b77
lists everywhere
Neumann-A d896766
play with configure_env
Neumann-A 569bbf0
get logs
Neumann-A e91d8cd
retry
Neumann-A 85307d2
print message
Neumann-A af115c9
move stuff to the correct location
Neumann-A 1c82d5a
more changes
Neumann-A 636bf54
next try to figure out where abiflags get ignored
Neumann-A f17b7a0
more debugging
Neumann-A 75f71e5
was this the issue?
Neumann-A 9a22df8
remove env settinng
Neumann-A aac6d97
use correct config var
Neumann-A ab1dfff
cleanup
Neumann-A 9039911
revert zlib
Neumann-A 4737d7f
revert pipeline
Neumann-A cc46900
dont error gmp
Neumann-A 43f84ae
guard extra opts correctly
Neumann-A 14d1540
fix bugs
Neumann-A 5dbcba9
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A 4a6c3ae
remove vcpkg-make-test to make the PR look green
Neumann-A eccecb3
use --x-cmake(-port)?-debug
Neumann-A 636ee01
Merge branch 'vcpkg-make' of https://github.com/Neumann-A/vcpkg into …
Neumann-A 30037a3
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A 68e8a17
format manifest
Neumann-A 0262490
v db
Neumann-A 132a1fd
Merge branch 'microsoft:master' into vcpkg-make
Neumann-A be02f37
Merge branch 'master' into vcpkg-make
Neumann-A 3d05e58
Apply suggestions from code review
Neumann-A ea23f7a
move general stuff to vcpkg-scripts
Neumann-A a2384ee
v db
Neumann-A 594951e
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A 4ca2935
Apply suggestions from code review
Neumann-A 30d7344
Merge branch 'vcpkg-make' of https://github.com/Neumann-A/vcpkg into …
Neumann-A d7de9e3
revert user vscode settings
Neumann-A bc55b5f
add missing transformation for 'current_installed_dir_msys'
Neumann-A db21699
correctly use VCPKG_CMAKE_CONFIGURE_OPTIONS
Neumann-A 40ca608
switch x264 to vcpkg-make
Neumann-A 77dc21c
Looks like vcpkg-make needs to write response files for MSVC
Neumann-A 931e197
move vcpkg-scripts back into vcpkg-make
Neumann-A 820014b
Fix flags passing
Neumann-A ee20937
use response file
Neumann-A 2e9ee94
add USE_RESPONSE_FILES
Neumann-A 825d759
switch coin-or-cbc
Neumann-A 411337e
add NASM into PATH for android
Neumann-A 774470b
make env override platform consistent.
Neumann-A d5c4a4b
bump port version
Neumann-A 285e34a
v db
Neumann-A ffe8e94
Apply a few suggestions from code review
Neumann-A bab5cb1
rename missed NO_WRAPPERS
Neumann-A 4d34bee
v db
Neumann-A 5215e66
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A b65888c
v db
Neumann-A 32c3953
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A c859085
v db
Neumann-A 8cecf44
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A ecdd5cb
revert changes to libbson
Neumann-A 00c37b0
remove vcpkg_autotools_configure
Neumann-A 4957b2f
remove libbson v db
Neumann-A d5e0f13
v db
Neumann-A 853f547
Merge branch 'microsoft:master' into vcpkg-make
Neumann-A 2c0f274
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A f730e39
remove cacheing
Neumann-A 39d86c1
remove ADD_BIN_TO_PATH
Neumann-A dfb60ab
remove POST_CONFIGURE_CMAKE_COMMANDS
Neumann-A cd156fe
remove some comments
Neumann-A e590d18
v db
Neumann-A 4b53ef9
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A e528798
port libidn2 to vcpkg-make
Neumann-A 7af0699
v db
Neumann-A 940d428
Merge remote-tracking branch 'upstream/master' into vcpkg-make
Neumann-A a94f56b
Remove SHELL as a toplevel option for now
Neumann-A 0b8b6cc
v db
Neumann-A File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
|
Neumann-A marked this conversation as resolved.
Outdated
|
||
| // Verwendet IntelliSense zum Ermitteln möglicher Attribute. | ||
| // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen. | ||
| // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
|
|
||
| { | ||
| "type": "cmake", | ||
| "cmakeDebugType" : "external", | ||
| "request": "launch", | ||
| "name": "vcpkg-external-debug", | ||
| "pipeName": "\\\\.\\pipe\\vcpkg-cmake-debugging" | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "cmake.generator" : "Ninja" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| { | ||
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
| // for the documentation about the tasks.json format | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Remove-vcpkg-make-test", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/vcpkg remove vcpkg-make --recurse", | ||
| }, | ||
| { | ||
| "label": "Debug CMake configure within vcpkg", | ||
| "type": "shell", | ||
| "dependsOn" : [ | ||
| "Remove-vcpkg-make-test" | ||
| ], | ||
| "command": "${workspaceFolder}/vcpkg", | ||
| "args" : [ | ||
| "install", | ||
| "vcpkg-make-test", | ||
| "--binarysource=clear", | ||
| "--x-cmake-args=-DVCPKG_CMAKE_CONFIGURE_OPTIONS=--debugger;--debugger-pipe=\\\\.\\pipe\\vcpkg-cmake-debugging" | ||
| ], | ||
| "isBackground": true, | ||
| "group": "none", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "new" | ||
| }, | ||
| "problemMatcher": [ | ||
| { | ||
| "pattern": [ | ||
| { | ||
| "regexp": ".", | ||
| "file": 1, | ||
| "location": 2, | ||
| "message": 3 | ||
| } | ||
| ], | ||
| "background": { | ||
| "activeOnStart": true, | ||
| "beginsPattern": "Computing installation plan", | ||
| "endsPattern": "Configuring x64-windows-release", | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "label": "Debug portfile execution", | ||
| "type": "shell", | ||
| "dependsOn" : [ | ||
| "Remove-vcpkg-make-test" | ||
| ], | ||
| "command": "${workspaceFolder}/vcpkg", | ||
| "args" : [ | ||
| "install", | ||
| "vcpkg-make-test", | ||
| "--binarysource=clear", | ||
| "--x-cmake-args=--debugger", | ||
| "--x-cmake-args=--debugger-pipe=\\\\.\\pipe\\vcpkg-cmake-debugging" | ||
| ], | ||
| "isBackground": true, | ||
| "group": "none", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "new" | ||
| }, | ||
| "problemMatcher": [ | ||
| { | ||
| "pattern": [ | ||
| { | ||
| "regexp": ".", | ||
| "file": 1, | ||
| "location": 2, | ||
| "message": 3 | ||
| } | ||
| ], | ||
| "background": { | ||
| "activeOnStart": true, | ||
| "beginsPattern": "Computing installation plan", | ||
| "endsPattern": "Configuring x64-windows-release", | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "type": "cmake", | ||
| "label": "CMake: Installieren", | ||
| "command": "install", | ||
| "problemMatcher": [], | ||
| "detail": "CMake-Vorlage Installieren Aufgabe" | ||
| }, | ||
|
|
||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| vcpkg_make_configure() | ||
| vcpkg_make_install() | ||
|
|
||
| # Note to self: Force install local cmake extension with external debugger support via: code --install-extension .\cmake-tools.vsix --force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "vcpkg-make-test", | ||
| "version-date": "2023-05-15", | ||
| "documentation": "https://vcpkg.io/en/docs/maintainers/ports/vcpkg-make.html", | ||
| "license": "MIT", | ||
| "supports": "native", | ||
| "dependencies" : [ | ||
| "vcpkg-make" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled) | ||
|
|
||
| vcpkg_download_distfile( | ||
| ar_lib_wrapper | ||
| URLS https://raw.githubusercontent.com/autotools-mirror/automake/43a53bdf4b76377b5c012b8c8e8f478fb56d1ec0/lib/ar-lib | ||
| FILENAME ar-lib | ||
| SHA512 6019ffebf4b7b0547aa018c7d19bc915a228825d2acdee953a36919a88c30352e620f61c27a3e6f701af2885c8eb8d4ba3a4a3c2e821c54c03dceeef8eec108f | ||
| ) | ||
| vcpkg_download_distfile( | ||
| compile_wrapper | ||
| URLS https://raw.githubusercontent.com/autotools-mirror/automake/43a53bdf4b76377b5c012b8c8e8f478fb56d1ec0/lib/compile | ||
| FILENAME compile | ||
| SHA512 3ef82f486f59be4cae1f1f95a9b70d4404f0333100be84c2e7061bd466201224a2bd1c7d871d97801eb9a441809bb47e7821fca8c85c29cc43ab15e6edda7f8c | ||
| ) | ||
|
|
||
| file(COPY | ||
| "${CMAKE_CURRENT_LIST_DIR}/" | ||
| DESTINATION | ||
| "${CURRENT_PACKAGES_DIR}/share/${PORT}" | ||
| ) | ||
| file(COPY | ||
| "${ar_lib_wrapper}" | ||
| "${compile_wrapper}" | ||
| DESTINATION | ||
| "${CURRENT_PACKAGES_DIR}/share/${PORT}/wrappers" | ||
| ) | ||
|
|
||
| file(REMOVE | ||
| "${CURRENT_PACKAGES_DIR}/share/${PORT}/portfile.cmake" | ||
| "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg.json" | ||
| ) | ||
|
|
||
| vcpkg_install_copyright(FILE_LIST "${VCPKG_ROOT_DIR}/LICENSE.txt") | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,194 @@ | ||
| include_guard(GLOBAL) | ||
|
|
||
| ### Mapping variables | ||
| macro(z_vcpkg_make_set_common_vars) | ||
| set(path_suffix_RELEASE "") | ||
| set(path_suffix_DEBUG "/debug") | ||
| set(suffix_RELEASE "rel") | ||
| set(suffix_DEBUG "dbg") | ||
| foreach(config IN ITEMS RELEASE DEBUG) | ||
| set("workdir_${config}" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${suffix_${config}}") | ||
| endforeach() | ||
|
Neumann-A marked this conversation as resolved.
Outdated
|
||
| endmacro() | ||
|
|
||
| #### | ||
| function(z_vcpkg_make_determine_arch out_var value) | ||
| if(${value} MATCHES "(amd|AMD)64") | ||
| set(${out_var} x86_64 PARENT_SCOPE) | ||
| elseif(${value} MATCHES "(x|X)86") | ||
| set(${out_var} i686 PARENT_SCOPE) | ||
| elseif(${value} MATCHES "^(ARM|arm)64$") | ||
| set(${out_var} aarch64 PARENT_SCOPE) | ||
| elseif(${value} MATCHES "^(ARM|arm)$") | ||
| set(${out_var} arm PARENT_SCOPE) | ||
| elseif(${value} MATCHES "^(x86_64|i686|aarch64|arm)$" OR NOT VCPKG_TARGET_IS_WINDOWS) | ||
| # Do nothing an assume valid architectures | ||
| set("${out_var}" "${value}" PARENT_SCOPE) | ||
| else() | ||
| message(FATAL_ERROR "Unsupported architecture '${value}' in '${CMAKE_CURRENT_FUNCTION}'!" ) | ||
| endif() | ||
| endfunction() | ||
|
|
||
| function(z_vcpkg_make_determine_host_arch out_var) | ||
| if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) | ||
| set(arch $ENV{PROCESSOR_ARCHITEW6432}) | ||
| elseif(DEFINED ENV{PROCESSOR_ARCHITECTURE}) | ||
| set(arch $ENV{PROCESSOR_ARCHITECTURE}) | ||
| else() | ||
| set(arch "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}") | ||
| endif() | ||
| z_vcpkg_make_determine_arch("${out_var}" "${arch}") | ||
| set("${out_var}" "${${out_var}}" PARENT_SCOPE) | ||
| endfunction() | ||
|
|
||
| function(z_vcpkg_make_determine_target_arch out_var) | ||
| list(LENGTH VCPKG_OSX_ARCHITECTURES osx_archs_num) | ||
| if(osx_archs_num GREATER_EQUAL 2 AND VCPKG_TARGET_IS_OSX) | ||
| set(${out_var} "universal") | ||
| else() | ||
| z_vcpkg_make_determine_arch(${out_var} "${VCPKG_TARGET_ARCHITECTURE}") | ||
| endif() | ||
| set("${out_var}" "${${out_var}}" PARENT_SCOPE) | ||
| endfunction() | ||
|
|
||
|
|
||
| function(z_vcpkg_make_prepare_compiler_flags) | ||
| cmake_parse_arguments(PARSE_ARGV 0 arg | ||
| "NO_CPP" | ||
| "LIBS_OUT" | ||
| "LANGUAGES" | ||
| ) | ||
| if(DEFINED arg_LANGUAGES) | ||
| # What a nice trick to get more output from vcpkg_cmake_get_vars if required | ||
| # But what will it return for ASM on windows? TODO: Needs actual testing | ||
| # list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_LANGUAGES=C\;CXX\;ASM") ASM compiler will point to CL with MSVC | ||
| list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_LANGUAGES=${arg_LANGUAGES}") | ||
| endif() | ||
| vcpkg_cmake_get_vars(cmake_vars_file) | ||
| include("${cmake_vars_file}") | ||
|
|
||
| #TODO: parent scope requiered vars | ||
|
|
||
| endfunction() | ||
|
|
||
| function(z_vcpkg_make_prepare_environment_common) | ||
| endfunction() | ||
|
|
||
|
|
||
| ### General helper scripts (should maybe be moved to a seperate port) | ||
|
|
||
| function(z_vcpkg_convert_to_msys_path outvar invar) | ||
| if(CMAKE_HOST_WIN32) | ||
| string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" current_installed_dir_msys "${invar}") | ||
| endif() | ||
| set("${outvar}" "${current_installed_dir_msys}" PARENT_SCOPE) | ||
| endfunction() | ||
| function(z_vcpkg_escape_spaces_in_path outvar invar) | ||
| string(REPLACE " " "\\ " current_installed_dir_escaped "${invar}") | ||
| set("${outvar}" "${current_installed_dir_escaped}" PARENT_SCOPE) | ||
| endfunction() | ||
|
|
||
| macro(z_vcpkg_unparsed_args warning_level) | ||
| if(DEFINED arg_UNPARSED_ARGUMENTS) | ||
| message("${warning_level}" "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") | ||
| endif() | ||
| endmacro() | ||
|
|
||
| macro(z_vcpkg_conflicting_args) | ||
| set(conflicting_args_set "") | ||
| foreach(z_vcpkg_conflicting_args_index RANGE 0 "${ARGC}") | ||
| if(${ARGV${z_vcpkg_conflicting_args_index}}) | ||
| list(APPEND conflicting_args_set "${ARGV${z_vcpkg_conflicting_args_index}}") | ||
| endif() | ||
| endforeach() | ||
| list(LENGTH conflicting_args_set conflicting_args_set_length) | ||
| if(conflicting_args_set_length GREATER 1) | ||
| message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed conflicting arguments:'${conflicting_args_set}'. Only one of those arguments can be passed") | ||
| endif() | ||
| unset(conflicting_args_set_length) | ||
| unset(conflicting_args_set) | ||
| unset(z_vcpkg_conflicting_args_index) | ||
| endmacro() | ||
|
|
||
| function(z_vcpkg_set_global_property property value) | ||
| if(DEFINED ARGN AND NOT ARGN MATCHES "^APPEND(_STRING)?$") | ||
| message(FATAL_ERROR "'${CMAKE_CURRENT_FUNCTION}' called with invalid arguments '${ARGN}'") | ||
| endif() | ||
| set_property(GLOBAL ${ARGN} PROPERTY "z_vcpkg_global_property_${property}" ${value}) | ||
| endfunction() | ||
|
|
||
| function(z_vcpkg_get_global_property outvar property) | ||
| if(DEFINED ARGN AND NOT ARGN STREQUAL "SET") | ||
| message(FATAL_ERROR "'${CMAKE_CURRENT_FUNCTION}' called with invalid arguments '${ARGN}'") | ||
| endif() | ||
| get_property(outprop GLOBAL PROPERTY "z_vcpkg_global_property_${property}" ${ARGN}) | ||
| set(${outvar} "${outprop}" PARENT_SCOPE) | ||
| endfunction() | ||
|
|
||
| function(z_vcpkg_warn_path_with_spaces) | ||
| vcpkg_list(SET z_vcm_paths_with_spaces) | ||
| if(CURRENT_BUILDTREES_DIR MATCHES " ") | ||
| vcpkg_list(APPEND z_vcm_paths_with_spaces "${CURRENT_BUILDTREES_DIR}") | ||
| endif() | ||
| if(CURRENT_PACKAGES_DIR MATCHES " ") | ||
| vcpkg_list(APPEND z_vcm_paths_with_spaces "${CURRENT_PACKAGES_DIR}") | ||
| endif() | ||
| if(CURRENT_INSTALLED_DIR MATCHES " ") | ||
| vcpkg_list(APPEND z_vcm_paths_with_spaces "${CURRENT_INSTALLED_DIR}") | ||
| endif() | ||
| if(z_vcm_paths_with_spaces) | ||
| # Don't bother with whitespace. The tools will probably fail and I tried very hard trying to make it work (no success so far)! | ||
| vcpkg_list(APPEND z_vcm_paths_with_spaces "Please move the path to one without whitespaces!") | ||
| list(JOIN z_vcm_paths_with_spaces "\n " z_vcm_paths_with_spaces) | ||
| message(STATUS "Warning: Paths with embedded space may be handled incorrectly by configure:\n ${z_vcm_paths_with_spaces}") | ||
| endif() | ||
| endfunctioN() | ||
|
|
||
| ### | ||
| function(vcpkg_insert_msys_into_path msys_out) | ||
| cmake_parse_arguments(PARSE_ARGV 0 arg | ||
| "" | ||
| "PATH_OUT" | ||
| "PACKAGES" | ||
| ) | ||
| vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${arg_ADDITIONAL_PACKAGES}) | ||
| cmake_path(CONVERT "$ENV{PATH}" TO_CMAKE_PATH_LIST path_list NORMALIZE) | ||
| cmake_path(CONVERT "$ENV{SystemRoot}" TO_CMAKE_PATH_LIST system_root NORMALIZE) | ||
| cmake_path(CONVERT "$ENV{LOCALAPPDATA}" TO_CMAKE_PATH_LIST local_app_data NORMALIZE) | ||
| file(REAL_PATH "${system_root}" system_root) | ||
|
|
||
| vcpkg_list(SET find_system_dirs | ||
| "${system_root}/system32" | ||
| "${system_root}/System32" | ||
| "${system_root}/system32/" | ||
| "${system_root}/System32/" | ||
| "${local_app_data}/Microsoft/WindowsApps" | ||
| "${local_app_data}/Microsoft/WindowsApps/" | ||
| ) | ||
|
|
||
| string(TOUPPER "${find_system_dirs}" find_system_dirs_upper) | ||
|
|
||
| set(index 0) | ||
| set(appending TRUE) | ||
| foreach(item IN LISTS path_list) | ||
| if(item IN_LIST find_system_dirs OR item IN_LIST find_system_dirs_upper) | ||
| set(appending FALSE) | ||
| break() | ||
| endif() | ||
| math(EXPR index "${index} + 1") | ||
| endforeach() | ||
|
|
||
| if(appending) | ||
| message(WARNING "Unable to find system dir in the PATH variable! Appending required msys paths!") | ||
| endif() | ||
| vcpkg_list(INSERT path_list "${index}" "${MSYS_ROOT}/usr/bin") | ||
|
|
||
| cmake_path(CONVERT "${path_list}" TO_NATIVE_PATH_LIST native_path_list) | ||
| set(ENV{PATH} "${native_path_list}") # Should this be backed up? | ||
|
|
||
| if(DEFINED arg_PATH_OUT) | ||
| set("${arg_PATH_OUT}" "${path_list}" PARENT_SCOPE) | ||
| endif() | ||
|
|
||
| set("${msys_out}" "${MSYS_ROOT}" PARENT_SCOPE) | ||
| endfunction() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.