File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ foreach(_listvar "common;common" "decoder;dec" "encoder;enc")
8686 # Check if the target was already found by Pkgconf
8787 if (TARGET PkgConfig::Brotli_${_component_name}${_brotli_stat_str} )
8888 # ALIAS since we don't want the PkgConfig namespace on the Cmake library (for end-users)
89- add_library (Brotli::${_component_name} ALIAS PkgConfig::Brotli_${_component_name}${_brotli_stat_str} )
89+ if (NOT TARGET Brotli::${_component_name} )
90+ add_library (Brotli::${_component_name} ALIAS PkgConfig::Brotli_${_component_name}${_brotli_stat_str} )
91+ endif ()
9092
9193 # Tells HANDLE_COMPONENTS we found the component
9294 set (Brotli_${_component_name} _FOUND TRUE )
@@ -139,7 +141,10 @@ foreach(_listvar "common;common" "decoder;dec" "encoder;enc")
139141 # Tells HANDLE_COMPONENTS we found the component
140142 set (Brotli_${_component_name} _FOUND TRUE )
141143
142- add_library ("Brotli::${_component_name} " UNKNOWN IMPORTED )
144+ if (NOT TARGET Brotli::${_component_name} )
145+ add_library ("Brotli::${_component_name} " UNKNOWN IMPORTED )
146+ endif ()
147+
143148 # Attach the literal library and include dir to the IMPORTED target for the end-user
144149 set_target_properties ("Brotli::${_component_name} " PROPERTIES
145150 INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIR} "
You can’t perform that action at this time.
0 commit comments