Sfoglia il codice sorgente

CMake: Fix "whitelisted property" error from CMake <3.8

Sam Edwards 7 anni fa
parent
commit
30dd14c991
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      cmake/macros/PackageConfig.cmake

+ 3 - 2
cmake/macros/PackageConfig.cmake

@@ -364,8 +364,9 @@ function(export_packages filename)
             endforeach(config)
             endforeach(config)
           endif()
           endif()
 
 
-        else()
-          # This is an INTERFACE_LIBRARY
+        elseif(CMAKE_VERSION VERSION_GREATER "3.8")
+          # This is an INTERFACE_LIBRARY, and CMake is new enough to support
+          # IMPORTED_IMPLIB
           get_target_property(imported_libname "${head}" IMPORTED_LIBNAME)
           get_target_property(imported_libname "${head}" IMPORTED_LIBNAME)
           if(imported_libname)
           if(imported_libname)
             list(APPEND libraries ${imported_libname})
             list(APPEND libraries ${imported_libname})