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 c6cfb2a2f3 #20828

Closes #20838
This commit is contained in:
Viktor Szakats 2026-03-06 15:18:31 +01:00
parent 009facd232
commit 9a3afc1083
No known key found for this signature in database

View File

@ -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_<CONFIG>" "MACOSX_PACKAGE_LOCATION" "VS_DEPLOYMENT_LOCATION")
endif()
foreach(_prop IN LISTS _cmake_property_list)