<div dir="ltr">I have a linker script that I'd like to export for dependent projects to use as if it were an actual library.  I'm having trouble figuring out how to do this.<div><br></div><div>With a linker script named "libmylib.so" I've tried:</div><div><br></div><div>set(LIBNAME mylib)</div><div>add_library(mylib INTERFACE)<br></div><div><div>install(TARGETS mylib</div><div>  EXPORT MyExport</div><div>  ARCHIVE DESTINATION ${LIB_INSTALL_DIR})</div><div>install(FILES libmylib.so ${LIB_INSTALL_DIR})</div><div><br></div><div>This will install the script properly, but attempting to use the linker script in the dependent project fails:</div><div><br></div><div>target_link_libraries(myapp mylib)</div><div><br></div><div>doesn't add mylib to the link line with the proper directory location (no -L option for the library location).</div><div><br></div><div>Any help appreciated,</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div></div></div>