We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6a8300 commit dec36f0Copy full SHA for dec36f0
cmake/tools.cmake
@@ -94,6 +94,15 @@ function(patch_protobuf_targets)
94
endfunction()
95
96
function(project_build_tools_get_imported_location OUTPUT_VAR_NAME TARGET_NAME)
97
+
98
+ # The following if statement was added to support cmake versions < 3.19
99
+ get_target_property(TARGET_TYPE ${TARGET_NAME} TYPE)
100
+ if(TARGET_TYPE STREQUAL "INTERFACE_LIBRARY")
101
+ # For interface libraries, do not attempt to retrieve imported location.
102
+ set(${OUTPUT_VAR_NAME} "" PARENT_SCOPE)
103
+ return()
104
+ endif()
105
106
if(CMAKE_BUILD_TYPE)
107
string(TOUPPER "IMPORTED_LOCATION_${CMAKE_BUILD_TYPE}"
108
TRY_SPECIFY_IMPORTED_LOCATION)
0 commit comments