<div>Hi,</div><div><br></div><div>Imported library has scope in the directory in which it is created and below.</div><div><br></div><div>If I want to use this library in parent scope, what should I do?  </div><div><br></div>
<div>for example,</div><div><br></div><div>top CMakeLists.txt</div><div><br></div><div>add_subdirectory(sub)</div><div>add_executable(myapp main.cpp)</div><div>target_link_libraries(myapp imported_lib)</div><div><br></div>
<div>sub CMakeLists.txt</div><div><br></div><div>add_library(imported_lib STATIC IMPORTED)</div><div><br></div><div>Thanks for your helping~~</div>-- <br><p><b><span style="font-size:9pt">CONG MA </span></b></p>