From 06d8fe2932a581c3f5427efd6aad36e0ee1e9af4 Mon Sep 17 00:00:00 2001 From: Laurent Aphecetche Date: Sun, 8 Feb 2026 17:29:50 +0100 Subject: [PATCH] [CMake] Use OUTPUT_NAME if defined in ROOT_GENERATE_DICTIONARY --- cmake/modules/RootMacros.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/modules/RootMacros.cmake b/cmake/modules/RootMacros.cmake index 87c95d2e7ddf3..934f91542ec35 100644 --- a/cmake/modules/RootMacros.cmake +++ b/cmake/modules/RootMacros.cmake @@ -528,7 +528,13 @@ function(ROOT_GENERATE_DICTIONARY dictionary) if (NOT ${ARG_MODULE} STREQUAL ${library_target_name}) # message(AUTHOR_WARNING "The MODULE argument ${ARG_MODULE} and the deduced library name " # "${library_target_name} mismatch. Deduction stem: ${dictionary}.") - set(library_target_name ${ARG_MODULE}) + get_target_property(custom_name ${ARG_MODULE} OUTPUT_NAME) + if(NOT custom_name STREQUAL "custom_name-NOTFOUND") + # if the OUTPUT_NAME propery has been set, use that as library_target_name + set(library_target_name ${custom_name}) + else() + set(library_target_name ${ARG_MODULE}) + endif() endif() endif(ARG_MODULE)