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()