mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-15 03:35:39 +02:00
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
This commit is contained in:
@@ -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
|
||||
)
|
||||
]]
|
||||
|
Reference in New Issue
Block a user