On Thu, Dec 14, 2017 at 8:22 AM, Saad Khattak <saadrus...@gmail.com> wrote:
> Hi, > > I have several imported libraries: > > LibA > LibB > LibC > > Where each imported library has been populated by (where ${LIB_NAME} is > either LibA, LibB or LibC): > > add_library(${LIB_NAME} STATIC IMPORTED) > > And each library has the properties IMPORT_LOCATION_${CONFIGURATION} set > properly: > > set_target_properties(${LIB_NAME} > PROPERTIES IMPORTED_LOCATION_DEBUG # same for release > "location/of/library.lib" > ) > > Now let's say I have another imported library LibD that depends on LibA > and LibB such that any executable that uses LibD must also link with LibA > and LibB. To do that, I use: > > set_target_properties(LibD > PROPERTIES > IMPORTED_LINK_INTERFACE_LIBRARIES LibA LibB > ) > You probably want this instead: set_target_properties(LibD PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES "LibA;LibB" ) Note that if the property value is a list, you have to provide it as a single string (i.e. "LibA;LibB" rather than LibA LibB) -- Craig Scott Melbourne, Australia https://crascit.com
-- 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