From 7ed3632902a5c04150975862ed484c2ef8ad5266 Mon Sep 17 00:00:00 2001
From: Yegor Yefremov <yegorslists@googlemail.com>
Date: Mon, 31 Jan 2022 07:13:54 +0100
Subject: [PATCH] CMake: use CMAKE_CURRENT_BINARY_DIR to locate avrdude.conf

With the split CMakeLists.txt infrastructure avrdude.conf
will be created in the build/src and not build folder. Hence,
fix its location in the install command.
---
 src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b32934f5..1714421c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -268,5 +268,5 @@ install(TARGETS libavrdude
     ARCHIVE DESTINATION lib
     PUBLIC_HEADER DESTINATION include COMPONENT dev
     )
-install(FILES "${PROJECT_BINARY_DIR}/avrdude.conf" TYPE SYSCONF)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/avrdude.conf" TYPE SYSCONF)
 install(FILES avrdude.1 TYPE MAN)