From 13a95cf6505e2654106628fa8525c085f6f3763d Mon Sep 17 00:00:00 2001 From: Andrei Astafev Date: Tue, 12 Dec 2023 12:23:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=B2=D0=B0=D1=82=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=B7=D0=B0=D0=BF=D1=80=D0=B5=D1=89=D1=91=D0=BB=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=B8=D1=82=D0=B5=D1=80=D1=84=D0=B5?= =?UTF-8?q?=D0=B9=D1=81=D0=BD=D0=BE=D0=B9=20=D1=86=D0=B5=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyxCMake/lib/generators/PrivateConfigHeader.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MyxCMake/lib/generators/PrivateConfigHeader.cmake b/MyxCMake/lib/generators/PrivateConfigHeader.cmake index d4bfdc3..e9d3201 100644 --- a/MyxCMake/lib/generators/PrivateConfigHeader.cmake +++ b/MyxCMake/lib/generators/PrivateConfigHeader.cmake @@ -31,5 +31,10 @@ function(myx_generate_private_config_header TARGET_NAME BASE_FILENAME) configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/PrivateConfig.hpp.in" ${__filename}) set_property(TARGET ${TARGET_NAME} APPEND PROPERTY PRIVATE_HEADER_FILES ${__filename}) - target_sources(${TARGET_NAME} PRIVATE ${__filename}) + get_target_property(__target_type ${TARGET_NAME} TYPE) + if(${__target_type} STREQUAL "INTERFACE_LIBRARY") + target_sources(${TARGET_NAME} INTERFACE ${__filename}) + else() + target_sources(${TARGET_NAME} PRIVATE ${__filename}) + endif() endfunction()