Hello! The binary I am building has a dependency on an external library. This library may be present system-wide, otherwise I am building it in a subdirectory. Therefore I am calling these commands:
add_custom_target(BuildMyLib ...)
add_library(MyLib SHARED
IMPORTED)
add_dependencies(MyLib BuildMyLib)
set_property(TARGET MyLib
PROPERTY IMPORTED_LOCATION "${MYLIB_DIR}/build")
target_link_libraries(MyBin
MyLib)
This however does not work:
Apparently imported libraries cannot
have dependencies:
"""add_dependencies Adding dependency to non-existent
target"""
Is there a way to make the imported library a real target, which
can have dependencies? Or, if not, can such a feature be added to
CMake?
Kind regards,
Dennis
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
