[CMake] find_package and get_target_property

CHEVRIER, Marc marc.chevrier at sap.com
Fri Apr 13 03:05:41 EDT 2018


The creation of “imported” target is the responsibility of the package. May be the package “LibA” does not create a such target.
In this case, you have to rely on variables (like LibA_LIBRARIES and so on…). The documentation of the package, if any, generally describe how to use the package.


From: CMake <cmake-bounces at cmake.org> on behalf of Saad Khattak <saadrustam at gmail.com>
Date: Friday 13 April 2018 at 05:29
To: Cmake Mailing List <cmake at cmake.org>
Subject: [CMake] find_package and get_target_property

Hi,

I am successfully able to find a package using find_package(LibA) but I cannot do a get_target_property on the package as I get the error:

get_target_property() called with non-existent target "LibA"

How do I go about the target properties for a package?

- Saad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180413/f90b4f18/attachment.html>


More information about the CMake mailing list