From d95140031da7067985aa5b7e2af34a34e23d730b Mon Sep 17 00:00:00 2001 From: Miguel Ibero Date: Wed, 12 Jun 2024 18:55:44 +0200 Subject: [PATCH] make the dll_copy generated file a PRIVATE target_source This file is creating an error when trying to install as explained here https://stackoverflow.com/questions/60736689/cmake-target-sources-and-install. --- build-utils/cmake/shared_library.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-utils/cmake/shared_library.cmake b/build-utils/cmake/shared_library.cmake index 4f7a01d52..980eee9cd 100644 --- a/build-utils/cmake/shared_library.cmake +++ b/build-utils/cmake/shared_library.cmake @@ -43,6 +43,6 @@ function(target_copy_shared_libraries _TARGET) VERBATIM) # This allows to create a dependency with the command above, so command is executed again when target is built AND a DLL changed - target_sources(${_TARGET} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/${_TARGET}_dll_copy") + target_sources(${_TARGET} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${_TARGET}_dll_copy") endif() -endfunction() \ No newline at end of file +endfunction()