-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description of changes: Currently the pkgconfig files are broken when aws-lc is built with Nix. See https://github.com/jtojnar/cmake-snips?tab=readme-ov-file#concatenating-paths-when-building-pkg-config-files, and the PR made to libfmt fmtlib/fmt#1657 ### Call-outs: I'm not sure if bumping the minimum required CMake version is preferred. The alternative would be to add https://github.com/jtojnar/cmake-snips/blob/master/CMakeScripts/JoinPaths.cmake to the `cmake/` directory in the repository. However, most linux distributions have at least CMake 3.20, if not 3.25 so I don't see why this would be a problem. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
- Loading branch information
Showing
5 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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,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 | ||
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() | ||
file(TO_NATIVE_PATH "${temp_path}" temp_path) | ||
set(${joined_path} "${temp_path}" PARENT_SCOPE) | ||
endfunction() |
This file contains 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 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 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