diff options
| author | Martin Hořeňovský | 2025-08-09 23:05:08 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-08-09 23:05:18 +0200 |
| commit | 7cad6d75390668ad2b6bec8432a2e408a992e1bf (patch) | |
| tree | c480820de824560ac6ce4f8c30c4611abf9e8743 | |
| parent | 644821ce28cb25d7992a4d0375b1d83214392592 (diff) | |
| download | catch3-7cad6d75390668ad2b6bec8432a2e408a992e1bf.tar.gz | |
Handle DESTDIR env var when generating pkgconfig files
Having the ability to configure the installation path at config
time, and the ability to change the prefix at install time is not
enough, apparently people also use env var to redirect them instead.
Closes #3006
| -rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b4e4f58..33377f5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,14 +198,14 @@ if(NOT_SUBPROJECT) set(lib_name "$<TARGET_FILE_BASE_NAME:Catch2>") configure_file( "${impl_pc_file}" - "${CMAKE_INSTALL_PREFIX}/${install_pkgconfdir}/catch2.pc" + "$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${install_pkgconfdir}/catch2.pc" @ONLY ) set(lib_name "$<TARGET_FILE_BASE_NAME:Catch2WithMain>") configure_file( "${main_pc_file}" - "${CMAKE_INSTALL_PREFIX}/${install_pkgconfdir}/catch2-with-main.pc" + "$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${install_pkgconfdir}/catch2-with-main.pc" @ONLY ) ]] |