On 01/20/2016 11:57 AM, rle...@codelibre.net wrote: >>> + INTERFACE_LIBRARIES "${PNG_LIBRARIES}") > > I would have expected something like > > set_target_properties(PNG::PNG PROPERTIES INTERFACE_LINK_LIBRARIES > ZLIB::ZLIB)
Yes. > after all of the "if(EXISTS... add imported link interface/location" > blocks, so you get the appropriate zlib library. Certainly, I don't think > PNG_LIBRARIES is appropriate to use for any of the imported targets, > otherwise the system-specific zlib library path is going to get embedded > in exported configuration when you call install(... EXPORT) to export the > library configuration for find_package. I'd just use PNG_LIBRARY here and > then add the dependencies as imported targets. Thanks for the review, Roger. I've reverted the topic from 'next' awaiting revisions from Sam as discussed here. This PNG -> ZLIB dependency is particularly important to get right because this relationship is commonly used as an example of how find modules should handle dependencies. > As an aside, I've found some limitations I've split the thread with a separate response to this part. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers