X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Fdeps%2Fzstd-1.5.5%2Fbuild%2Fcmake%2FCMakeModules%2FJoinPaths.cmake;fp=deps%2Flibchdr%2Fdeps%2Fzstd-1.5.5%2Fbuild%2Fcmake%2FCMakeModules%2FJoinPaths.cmake;h=c68d91b84dbc7238d8202cd55c6022e8c94fac3d;hb=648db22b0750712da893c306efcc8e4b2d3a4e3c;hp=0000000000000000000000000000000000000000;hpb=e2fb1389dc12376acb84e4993ed3b08760257252;p=pcsx_rearmed.git diff --git a/deps/libchdr/deps/zstd-1.5.5/build/cmake/CMakeModules/JoinPaths.cmake b/deps/libchdr/deps/zstd-1.5.5/build/cmake/CMakeModules/JoinPaths.cmake new file mode 100644 index 00000000..c68d91b8 --- /dev/null +++ b/deps/libchdr/deps/zstd-1.5.5/build/cmake/CMakeModules/JoinPaths.cmake @@ -0,0 +1,23 @@ +# This module provides function for joining paths +# known from most languages +# +# SPDX-License-Identifier: (MIT OR CC0-1.0) +# Copyright 2020 Jan Tojnar +# https://github.com/jtojnar/cmake-snips +# +# Modelled after Python’s os.path.join +# https://docs.python.org/3.7/library/os.path.html#os.path.join +# Windows not supported +function(join_paths joined_path first_path_segment) + set(temp_path "${first_path_segment}") + foreach(current_segment IN LISTS ARGN) + if(NOT ("${current_segment}" STREQUAL "")) + if(IS_ABSOLUTE "${current_segment}") + set(temp_path "${current_segment}") + else() + set(temp_path "${temp_path}/${current_segment}") + endif() + endif() + endforeach() + set(${joined_path} "${temp_path}" PARENT_SCOPE) +endfunction()