From 9a3afc1083202731ed34e3f71cf345ecc6dd9296 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 6 Mar 2026 15:18:31 +0100 Subject: [PATCH] cmake: fix `LOCATION` property access condition (debug) To match other parts of curl's CMake script and the CMake source. Ref: https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.0/Source/cmTargetPropertyComputer.h?ref_type=tags#L68-101 Follow-up to c6cfb2a2f34df80c6d746d1cb07705d3fac7e67a #20828 Closes #20838 --- CMake/Utilities.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake index 7d2c8328e1..f86a6aa1e8 100644 --- a/CMake/Utilities.cmake +++ b/CMake/Utilities.cmake @@ -60,8 +60,8 @@ function(curl_dumptargetprops _target) list(REMOVE_DUPLICATES _cmake_property_list) list(REMOVE_ITEM _cmake_property_list "") list(APPEND _cmake_property_list "INTERFACE_LIBCURL_PC_MODULES") - get_target_property(_target_type ${_target} TYPE) - if(NOT _target_type MATCHES "(INTERFACE_LIBRARY|UNKNOWN_LIBRARY)") + get_target_property(_target_imported ${_target} IMPORTED) + if(NOT _target_imported) list(REMOVE_ITEM _cmake_property_list "LOCATION" "LOCATION_" "MACOSX_PACKAGE_LOCATION" "VS_DEPLOYMENT_LOCATION") endif() foreach(_prop IN LISTS _cmake_property_list)