On 01/19/2016 11:50 AM, Sam Thursfield wrote: > Imported targets are now the recommended way of dealing with external > library dependencies.
Thanks! Adding Roger Leigh to Cc because he has implemented several of these for other modules. > + set(ALSA_LIBRARIES ${ALSA_LIBRARY}) > + set(ALSA_INCLUDE_DIRS ${ALSA_INCLUDE_DIR}) > + > + if(NOT TARGET ALSA::ASound) > + add_library(ALSA::ASound UNKNOWN IMPORTED) > + set_target_properties(ALSA::ASound PROPERTIES > + IMPORTED_LINK_INTERFACE_LANGUAGES "C" > + IMPORTED_LOCATION "${ALSA_LIBRARY}" > + INTERFACE_INCLUDE_DIRECTORIES "${ALSA_INCLUDE_DIRS}" > + INTERFACE_LIBRARIES "${ALSA_LIBRARY}" We shouldn't need to use INTERFACE_LIBRARIES here. The IMPORTED_LOCATION of an imported library should be enough to get it linked. -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