File: JoinPaths.cmake

package info (click to toggle)
ada-url 3.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,320 kB
  • sloc: cpp: 24,281; ansic: 4,553; python: 573; sh: 193; makefile: 17
file content (13 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()