From 2260a5ac5f78dac348a387351e1374f5289ad378 Mon Sep 17 00:00:00 2001 From: Andrei Astafev Date: Mon, 12 Feb 2024 16:45:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B2=D0=BC=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D1=8C=20c=20CMake=203.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyxCMake/lib/TargetSetup.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MyxCMake/lib/TargetSetup.cmake b/MyxCMake/lib/TargetSetup.cmake index f82ad2e..c6ae6ca 100644 --- a/MyxCMake/lib/TargetSetup.cmake +++ b/MyxCMake/lib/TargetSetup.cmake @@ -111,7 +111,9 @@ function(myx_target_setup TARGET_NAME) endif() endif() else() - target_link_libraries(${TARGET_NAME} PRIVATE ${__link_library}) + if((${CMAKE_VERSION} VERSION_GREATER "3.7.99") OR (NOT __target_type STREQUAL "OBJECT_LIBRARY")) + target_link_libraries(${TARGET_NAME} PRIVATE ${__link_library}) + endif() endif() endforeach() endif()