From 4a8e8622125072e35974aed2532bf087bfb92cfd Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 13 Apr 2023 10:51:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20CMake=20<=3D=203.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyxCMake/lib/AddInterfaceLibrary.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MyxCMake/lib/AddInterfaceLibrary.cmake b/MyxCMake/lib/AddInterfaceLibrary.cmake index c238d2e..acc202f 100644 --- a/MyxCMake/lib/AddInterfaceLibrary.cmake +++ b/MyxCMake/lib/AddInterfaceLibrary.cmake @@ -82,8 +82,12 @@ function(myx_add_interface_library TARGET_NAME) # то созданная цель исключается из цели `all`. # При этом сама цель `${TARGET_NAME}` может участвовать в сборке, # если окажется в перечне зависимостей. - if((NOT PROJECT_IS_TOP_LEVEL) AND (${CMAKE_VERSION} VERSION_GREATER "3.8.0")) - set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL True) + if(NOT PROJECT_IS_TOP_LEVEL) + if(${CMAKE_VERSION} VERSION_GREATER "3.17.0") + set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL True) + else() + set_target_properties(${TARGET_NAME} PROPERTIES INTERFACE_EXCLUDE_FROM_ALL True) + endif() return() endif()