gpgmepp: fix includedir path in the exported CMake target

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit is contained in:
Marcin Serwin
2025-12-22 16:49:08 +01:00
parent 13ff9c7001
commit 3e2fee2a5e
2 changed files with 43 additions and 1 deletions
@@ -0,0 +1,39 @@
From b56db4b30ec696b018c04400440d0252af13990a Mon Sep 17 00:00:00 2001
From: Marcin Serwin <marcin@serwin.dev>
Date: Mon, 22 Dec 2025 16:44:46 +0100
Subject: [PATCH] Don't hardcode 'include' as includedir
The headers are installed into the location pointed by
CMAKE_INSTALL_INCLUDEDIR so if it's different than the default 'include'
then the header path in the exported CMake targets is incorrect.
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
---
src/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7be46cb..97d21b1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -128,7 +128,7 @@ if(ENABLE_SHARED)
target_include_directories(Gpgmepp
PRIVATE ${LibGpgError_INCLUDE_DIRS}
- INTERFACE $<INSTALL_INTERFACE:include>
+ INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(Gpgmepp Gpgme::Gpgme)
@@ -144,7 +144,7 @@ if(ENABLE_STATIC)
target_include_directories(GpgmeppStatic
PRIVATE ${LibGpgError_INCLUDE_DIRS}
- INTERFACE $<INSTALL_INTERFACE:include>
+ INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(GpgmeppStatic Gpgme::Gpgme)
--
2.51.2
+4 -1
View File
@@ -16,7 +16,10 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-1HlgScBnCKJvMJb3SO8JU0fho8HlcFYXAf6VLD9WU4I=";
};
patches = [ ./0001-Fix-handling-of-absolute-install-dirs-in-.pc-install.patch ];
patches = [
./0001-Fix-handling-of-absolute-install-dirs-in-.pc-install.patch
./0001-Don-t-hardcode-include-as-includedir.patch
];
nativeBuildInputs = [
cmake