From 7ee3648b1e0ed9d1c1789ae79d3ac51ff431b688 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje <50274155+EduMenges@users.noreply.github.com> Date: Thu, 23 Apr 2026 17:36:48 -0300 Subject: [PATCH] CMake: fixed `tinycbor.pc` install The line configure_file(tinycbor.pc.in tinycbor.pc @ONLY) generated the file into CMAKE_CURRENT_BINARY_DIR, but the installation of this file was being done using CMAKE_BINARY_DIR. This creates an error if tinycbor is added through add_subdirectory, because it tries looking that the root binary directory, but doesn't find it there because tinycbor gets its own subdirectory. This should fix the installation by using that specific directory. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1854746..6ca3d4a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,7 @@ install(FILES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tinycbor ) install(FILES - ${CMAKE_BINARY_DIR}/tinycbor.pc + ${CMAKE_CURRENT_BINARY_DIR}/tinycbor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) install(