-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2786: Better concatenation for pkg-config values, better use of GNUInstallDirs variables r=RAOF a=OPNA2608 Similar situation as canonical/wlcs#258, canonical/wlcs#260: - CMake code assumes `CMAKE_INSTALL_<dir>` are relative to `CMAKE_INSTALL_PREFIX` when they may be absolute and completely outside of the `PREFIX`, blindly concatenating these two causes broken pkg-config files in such situations - `CMAKE_INSTALL_FULL_<dir>` should only be used in pkg-config files when the dir is not relative to the `${prefix}` so overriding the pkg-config variables has the intended effect - In various places, suitable GNUInstallDirs variables for specifying header & data file locations are ignored - As a minor point `FULL` & non-`FULL` variables are used inconsistently in `install` commands I've - fixed these concatenations in CMake & pkg-config files according to [jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files](https://github.com/jtojnar/cmake-snips/tree/a9d72829ab0cb42e541c9975e698d6b8282610ed#concatenating-paths-when-building-pkg-config-files) - added more usage of `CMAKE_INSTALL_INCLUDEDIR` (defaults to `include`) & `CMAKE_INSTALL_DATADIR` (`share`) and - replaced some `FULL` variables with non-`FULL` variants where the effect should be the same, for consistency I've cherry-picked these commits onto 2.11.0 and checked the pkg-config files with relative & absolute install paths, resulting files looked okay to me. I've also tried building egmde against it and it builds & launches, where previously it would fail to find Mir's headers if `CMAKE_INSTALL_INCLUDEDIR` was an absolute path. Co-authored-by: OPNA2608 <[email protected]>
- Loading branch information
Showing
29 changed files
with
92 additions
and
55 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 | ||
# 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() |
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
prefix=@PREFIX@ | ||
libdir=@LIBDIR@ | ||
includedir=@INCLUDEDIR@ | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
libdir=@PKGCONFIG_LIBDIR@ | ||
includedir=@PKGCONFIG_INCLUDEDIR@/mirtest | ||
|
||
Name: mirtest | ||
Description: Mir test assist library | ||
Version: @MIR_VERSION@ | ||
Requires: miral mirserver mirplatform mircommon mir-renderer-gl-dev | ||
Libs: -L@LIBDIR@ -lmir-test-assist -ldl -lboost_filesystem -lboost_system | ||
Cflags: -I@INCLUDEDIR@ | ||
Libs: -L${libdir} -lmir-test-assist -ldl -lboost_filesystem -lboost_system | ||
Cflags: -I${includedir} |
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